Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
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

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

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

Your Answer


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.