/var should stay chmod 755 and root:root. There is no reason to change /var.
For /var/www try:
chown -R myusername:www-data /var/www
chmod -R 755 /var/www
Make sure you keep this permissions when you create files. And you will probaby need to change some files to 775 on those that need to be written by apache2.
Important: Note that doing it this way, anybody who has access to your user account can modify the websites files.
No comments:
Post a Comment