4 ms·
On a recent (php) project, I ended up with a setup where all the source code files were owned by user A but the php-fpm pool executing them was running as user
by evunveot 10y ago
On a recent (php) project, I ended up with a setup where all the source code files were owned by user A but the php-fpm pool executing them was running as user B, i.e. web requests had no way of writing or modifying a php file that could then be executed over the web. (There was a user-B-writable directory for end-user uploaded files, but none of those would ever be executed remotely due to the nginx configuration.) There was no auto-update mechanism involved, but if there were it would have been a user A cron job.
Of course, you can still get yourself in trouble by doing dangerous things like mixing input with `include` or `eval`, but otherwise it seems like a strong mitigation against the worst exploits you see in php applications. Can or could Airship run in a configuration like that? It doesn't seem to be mentioned in the documentation.
- CiPHPerCoder 10y ago> Can or could Airship run in a configuration like that? It doesn't seem to be mentioned in the documentation. The documentation needs more TLC, and is my current focus. But yes, running the updates from a cron script under a different user than www-data (or equivalent) is not only possible, it's a good idea.