How do you set a directory to have persistent group permissions? How do you set a directory to have persistent group permissions? unix unix

How do you set a directory to have persistent group permissions?


You can propagate group permissions by setting the directory's setgid bit (chmod g+s). This may not be portable across all *nixes and all file systems.

http://en.wikipedia.org/wiki/Setuid#setgid_on_directories

http://www.gnu.org/software/coreutils/manual/html_node/Directory-Setuid-and-Setgid.html


If you are using ext3 or ReiserFS, this page about creating a Linux file server may help. Specifically step 7 suggests the following command.

setfacl -d -m g:sales:rw /groups/sales 


I think you should look here.

As the site says, "Unix doesn't support the idea of inherited permissions."

However, there is a section on ACLs (Access Control Lists), which I think is what you are looking for. By setting up an ACL, you can have your files inherit the same ACL from the directory, which I think is what you are asking for. setfacl is the shell command that will be what you need to look into.

Hope that helps!