0

My working group uses a shared directory on a linux server which is made group-writable (and group-executable). Users access this directory both via NFS from Linux boxes and via SMB from windows boxes.

Occasionally, users create a new subdirectory (which is ok) inside this shared folder but this subdirectory is often not group-writable. Is there a way how I (as the superuser) can enforce that all subdirectories created - no matter how - always get the group-writable flag?

What I do at the moment is an occasional recursive chmod g+w, but it would be much better if subdirectories were created with the correct permissions in the first place

1 Answer 1

1

You have two options, afaik

  • umask

  • acl

umask is the simplest way to go: you'll find a complete explanation here

"umask 002" says that write permission wont be stripped off group rights for new files or directories

So your problem could be solved by a smart placement of "umask 002" in /etc/profile or /etc/bashrc, if you want to make this the default system wise option, or in individual .profile or .bashrc

acl is a more elaborate solution, which allows to specify which users and groups will have what permissions on new files and directories

More info on that here.

Hope that helps :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .