Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set group write on a shared directory

Status
Not open for further replies.

unomateo

IS-IT--Management
May 9, 2006
38
0
0
US
I need some help with a shared directory on a linux server.

I made a group called web
I made a couple users called usr1 and usr2
usermod -a -G web usr1
usermod -a -G web usr2

I made a directory called test
chown root.web test -R
chmod 2775 test

Now I thought when usr1 creates a file in test, the file would have 664 permissions because of the guid? But when usr1 makes a file is is set to 644?
The file is owned by root.web

Did I do something wrong? How do I set the permissions on a folder so that when usr1 creates a file, usr2 can write to it?

Thanks in advance
 
Hi

I try umask in .profile users and change in 775 the home directory.

If I understand the problem.

Bye
 
As biondo68 suggested, umask is the key. You need to change the users' profiles to set umask 002 (022 is the default). The only issue with this is if the processes that create the files are not launched by interactive user logins, as their profiles may not be run and the umask is never set, in which case you may need to resort to using pam_umask to set it.

Another way is to set default file creation masks on the containing directory using setfacl, if the filesystem you are using supports it.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top