Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to set the gid bit so the child files/folders will be set to a specific group. But I noticed that the permissions for group are only set to read and execute, not write - by default at least. Is it possible to set it to ensure that the group always has (by default, unless explicitly changed of course), has write access to all children?

Thanks

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

The setgid bit controls the group that sub-ordination files/directories will have. If you want permissions set you will need to adjust the umask. A pretty common configuration is 022 which masks away the write access for both the group/other privileges. You probably want a umask of 002. Do a search on this site for umask to see how to set it. Some applications like sftp will need tweaks make in the right place.

share|improve this answer
add comment

If you're trying to do this with all users and don't necessarily have the ability to enforce umasks for all of them the POSIX ACL model does support inheritance in mostly the same way as the Windows permissions model. I don't touch it often so I'm hazy on the syntax, but man setfacl should set you straight.

share|improve this answer
add comment

Append this line to /etc/profile:

umask 002

By default, it's umask 022 used by most distros.

share|improve this answer
    
Thanks a lot. This worked. –  Chris Drumgoole Nov 19 '10 at 4:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.