3

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

Chris Drumgoole
  • 305
  • 1
  • 4
  • 9

3 Answers3

3

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.

jgoldschrafe
  • 4,385
  • 17
  • 18
2

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.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
1

Append this line to /etc/profile:

umask 002

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

Xiè Jìléi
  • 782
  • 7
  • 13
  • 27