giving read and write access to group and folder

6

3

Say I have a group called mygroup and I want it to have a permission of rwx (777) to the folder /var/www . How do I do this? What is the appropriate command to do this in ubuntu?

EquinoX

Posted 2011-11-08T01:09:49.633

Reputation: 191

Answers

8

chgrp -R mygroup /var/www
chmod -R g+rwxs /var/www

CAUTION: This will overwrite your group ownership and permissions of all files under /var/www.

The 'g' will cause newly-created files or directories to take the same group as the directory they are created in. This is needed to preserve the ownership of newly-created files and directories.

David Schwartz

Posted 2011-11-08T01:09:49.633

Reputation: 58 310