How to set up permissions for public_html?
Have followed the howto
Excellent guide, but it doesn't say how to set up permissions in /var/www/domain.com/public_html so that I can add, and edit the files easily (without needing root permissions).
At the moment, I got the directory public_html belonging to user. Is that the most secure way to set up permissions there, or is there a better way?
Ta.
1 Reply
Then you can login via ssh as the name of the user (joeblow, in this example) and edit the files as you wish, as joeblow will be the owner, and apache will have read (and probably write) access as required via apache2-mpm-itk.
You just need to put this in your virtual host configuration file:
<ifmodule mpm_itk_module="">AssignUserId joeblow joeblow</ifmodule>
This assumes you are using Debian and Apache. It could be the same on other OS's which Apache as well.
Edit: fixed AssignUserId user names