Linux Ubuntu 14.04.1 File Permissions

February 16, 2015 557 views

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.

1 Answer

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:

by Justin Ellingwood
In this article, we will discuss how to read and manipulate Linux permissions. We will cover how to use the "umask" command to choose default permission settings, and the "chmod" command, which can change the permissions of files and directories.
Have another answer? Share your knowledge.