How can i make user always create files + folders with 775 permission ? Please help
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Your users are made incorrectly. lets delete them, and start with two new ones.
Code:
# Get rid of your broken users and groups
userdel user1
userdel user2
groupdel user1
groupdel user2
# Create new users and a COMMON group
adduser user1
adduser user2
groupadd COMMON
# Add users to the COMMON group
usermod -g COMMON user1
usermod -g COMMON user2
chown -R user1:COMMON /home/user1
# make sure sftpd config has this in it
local_umask=0002
file_open_mode=0777
# make sure schroot.conf has this in it
groups=COMMON
at that point you will probably want to reboot, since some of the services running might not update their configuration.
This looks interesting, any way i can actually do this without deleting the users ? any way i can just modify them ?
# remove users from eachothers groups
gpasswd -d user1 user2
gpasswd -d user2 user1
# Create new COMMON group
groupadd COMMON
# Add users to the COMMON group
usermod -g COMMON user1
usermod -g COMMON user2
chown -R user1:COMMON /home/user1
# make sure sftpd config has this in it
local_umask=0002
file_open_mode=0777
# make sure schroot.conf has this in it
groups=COMMON
Since you really don't care about permission all that much, why not make one user account that both users use to login then all your problems are solved.
People here are trying to teach you something but you are really unwilling to learn. If you plan on maintaining a linux system you really need to get on the ball and stop asking people to take your hand and give your every command you need to type in because one day someone is going to give you sudo rm -rf / and if you don't know what it does you will learn very quickly.
# remove users from eachothers groups
gpasswd -d user1 user2
gpasswd -d user2 user1
# Create new COMMON group
groupadd COMMON
# Add users to the COMMON group
usermod -g COMMON user1
usermod -g COMMON user2
chown -R user1:COMMON /home/user1
# make sure sftpd config has this in it
local_umask=0002
file_open_mode=0777
# make sure schroot.conf has this in it
groups=COMMON
I will experiment with these "soon", not sure how soon soon is.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.