I have a small website running on a VPS. I'm using Nginx
as a web server (a simple LEMP
configuration). But now i have a problem: i have a small php script that needs to be able to write a log every once in a while...and for that to work i've given owner permissions to www-data
over /var/www/html/
after i ren chmod -R 755 /var/www/html
as root
. But once i gave owner permissions to www-data user over /var/www/html/
and i was, obviously, able to run that php script which has to write some logs i started to ask myself: isn't this going to be a HUGE security issue?
So, is making www-data
the owner of /var/www/html/
a security issue?
If yes, can you tell me why and what's to be done about it?
Thank you!