Sharing Write Permission

For more than one user to be able to write to the same directory it will be necessary to grant write permission to a group they share in common. The following example grants shared write permission to /var/www to the group “webmasters”.

sudo chgrp -R webmasters /var/www
sudo find /var/www -type d -exec chmod g=rwxs “{}” \;
sudo find /var/www -type f -exec chmod g=rws “{}” \;

EXAMPLES

chgrp staff /u
Change the group of /u to “staff”.

chgrp -hR staff /u
Change the group of /u and subfiles to “staff”.

Comments are closed.