Wednesday, June 1, 2022

[SOLVED] php7 fpm sock file ownership on service restart

Issue

I have just installed PHP7 https://github.com/kasparsd/php-7-debian

Everything works except each time I do service php7-fpm restart I need manually to set ownership on file /run/php7-fpm.sock to www-data

After setting the permissions everything works.. But how to avoid this on every restart?

The ownership is always root after restart

php-fpm.ini

user = www-data
group = www-data

Solution

Ownership of the file socket is determined by the listen.owner and listen.group directives in the FPM config file.



Answered By - symcbean
Answer Checked By - Pedro (WPSolving Volunteer)