[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to replicate the behaviour of /usr/local



Klistvud <quotations@aliceadsl.fr> writes:

>I have a shared directory on my system; what I'd like to achieve is 
>making every newly created (or copied from elsewhere) file belong to 
>the group owner "users". 

# chgrp users /path/to/shared/directory
# chmod g+s /path/to/shared/directory

The set-group-id bit on a directory causes all files created in that
directory to take the group id of the directory. Any directories created
in that directory also take the group id of the parent directory and
automatically have the set-group-id bit set on that directory. This
causes the group id to propogate down the hierarchy as new directories
are created.



Reply to: