supervisord profile
[program:satis]
command=/usr/local/webserver/php-7.1.15/bin/php artisan queue:work --sleep=3 --tries=2 --daemon
user=www
start supervisord as a root user
then add
to the phpecho exec("whoami"); // output: www
outputs www
, but adds
echo getenv("HOME"); // output: /root
gets / root
. If you execute
php -r "echo getenv("HOME");"
is / home/www
.
I would like to ask why the supervisord executes the php file (starts the supervisord, configuration user www under the root user) and executes getenv ("HOME")
will get / root
?