0

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.

Greg B
  • 609
  • 6
  • 19

1 Answers1

1

When listen.acl_users is set, listen.owner & listen.group are ignored, comment:

;listen.acl_users = apache,nginx
;listen.acl_groups =

then restart php-fpm

Abdul Azis
  • 11
  • 1