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
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.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.
Append this line to
/etc/profile
:By default, it's
umask 022
used by most distros.