Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’ve read a lot of articles on the subject of setting ownership and permissions for web servers and found good information, but I still can’t settle on the right answer. Are you able to help?
The scenario:
A small number of low profile websites, all of which need write access for logs, cache, etc. Updates are deployed frequently by using git over SSH. All are sites I have coded and am managing, so it’s only me that accesses the box. The server doesn’t do anything else other than LAMP.
The default position seems to be:
www-data userroot:www-data755 except for the logs/cache/etc which will be 775.I could do this by running a deploy script as root that updates the site and resets all the ownership and permissions. I would have to use a long/complex password for every change and adding a file will need chown/chmod.
This is OK, but this seems to be a much more convenient configuration:
web, set Apache/mod_php to run as this user./home/web.The benefits of the former method would be that write permissions are more limited, but if you can write at all then how much does that matter? It might be harder to escalate permissions as www-data than as a user with sudo access, but is brute forcing a strong password a realistic attack?
Can anyone offer advice or an alternative?
Thanks!
d120f92c45b144db8d6c4f97c5da0c
patrickniessenmakezens
2528527458a540fba5c38cc921bb27
c21c0b00bb284130a0d0cd3b7bdab4
IsaacMvd
Leon Junior
hashembarret@gmail.com
JetForMe
24608ead89f046a8abab394f968f2c
Philipp Mayerhofer
enews