On my ubuntu web server I have multiple virtual hosts for example:
/var/www/website1/html
/var/www/website2/html
/var/www/website3/html
I have 3 different users and I only want each user to be able to edit their own website files. I do not care if they can see each others files. All only need to make sure they can only edit their own files.
I have looked into editing sshd_config but using ssh seemed to restrict what they can see as well and I did not want to screw something up and make it so I could not ssh into my server anymore.
Can I accomplish what I want with just basic user permissions on the folders? For example setting the owner as user1 and the group as www-data. Or will that cause problems for apache?
Thank you for the help.
I believe this will work as long as the files have read access to apache can read them. So a simple “chown -R user directory” should do the trick.