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:newgroup
where my everyday user is innewgroup
. Am I now safe to set directories to775
, and files664
?newgroup
in this case). There should be no worries now.