I have a web server setup using nginx and PHP-FPM listening on a Unix socket. In my php-fpm.conf, I have specified
user = www group = www
When I run ps aux, I can see that the php-fpm worker processes run as www; the php-fpm master process runs as root.
However, I noticed that PHP scripts are executed as root; at least that's the output of
What can I do to run scripts as the www user? How can this even happen if the worker processes run as www?