I have a user that I want to give read and write access to a folder in my root home (/root/test
)
Is there a way to give them permission to only modify files in /root/test
, but not /root
itself?
Also, this is kind of a side question, but how can I prevent this user from being able to view or edit the files in /var/www
? There are some PHP files in there which contain sensitive information. I have already tried chmod -R o-r /var/www
but that prevented the webserver itself from working.
Thanks in advance!
You can use setfacl
:
sudo setfacl -R -m u:username:rwx /root/test
See man setfacl
and Prevent user from viewing and editing /var/www folders for more about.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments