Question

Linux Ubuntu 14.04.1 File Permissions

  • Posted February 16, 2015

Hi, im really new to Linux permissions so I would appreciate help with this simple query.

Ubuntu 14.04.1

I have 2 users root and user1

I have a directory /var/www/html/gallery

The directory is empty

I would like to create a new group add root and user1 to that group and make that group have read, write and delete permissions, (FULL), to the directory, /var/www/html/gallery

Can someone please help me ?

Thank you.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can create a new group with the command:

sudo addgroup groupname

You can then add your user to that group with:

sudo gpasswd -a user groupname

Finally, you can give that group permissions to the folder with:

sudo chown -R :groupname /var/www/html/gallery
sudo chmod g+wx /var/www/html/gallery

For more information on modifying permissions, check out: