To make working with my webserver easiest I am proposing doing something like the following:
sudo chown www-data:www-data /var/www -R
cd /var/www
sudo find . -type f -exec chmod 664 {} \;
sudo find . -type d -exec chmod 775 {} \;
I have my day-to-day user added to the www-data group too.
My question is: is this a foolish/risky permission set? Is giving www-data group those permissions opening my server up?
Thanks Alex
/var/www(-R) toroot:newgroupwhere my everyday user is innewgroup. Am I now safe to set directories to775, and files664? – Alex Hadley Sep 20 '11 at 9:53newgroupin this case). There should be no worries now. – Carlos Campderrós Sep 20 '11 at 10:41