I'm using apache and PHP-FPM on CentOS8, but I am running apache as the nidb
user. I've changed all of the config file locations I think I need to the nidb
username/group, but I still get an error about /run/php-fpm/www.sock
permissions once I restart php-fpm and apache.
When I manually change permissions of /run/php-fpm/www.sock
to 0777 or change the owner to nidb
, the website works with no errors. If I restart the php-fpm service, the owner is reset to root, and the website gives the error again.
In /etc/httpd/conf/httpd.conf
I have
User nidb
Group nidb
In /etc/php-fpm.d/www.conf
I have
user = nidb
group = nidb
listen.owner = nidb
listen.group = nidb
listen.mode = 0660
ps
shows that /user/sbin/httpd
is started by root
, and then launches a few processes owned by nidb
. ps
shows the same thing for php-fpm.