By batesm0t3l
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.