Give Read/Write Access to Group

15,731

chmod and chgrp aren't as scary as they appear and, the fact is, anything can be fixed by the root user if you mess it up.

To make the directory owned by the group "webgroup", just do:

sudo chgrp webgroup /var/www

To give the directory's group read/write access, just do:

sudo chmod g+rw /var/www

If you want this to apply to accessing and creating directories as well, use the 'X' option, e.g.:

sudo chmod g+rwX /var/www

Finally, if you want it to apply to all the folders and subfolders, use the 'recursive' option '-R', e.g.:

sudo chmod g+rwX /var/www -R
Share:
15,731

Related videos on Youtube

user2676140
Author by

user2676140

Updated on September 18, 2022

Comments

  • user2676140
    user2676140 over 1 year

    I have created a group called webgroup - what must I do to give read/write access to anyone in this group to the folder /var/www

    using the command sudo chmod frightens me as I know you can quickly destroy a system running any command as sudo, so I thought I would err with caution and ask.