Nginx + PHP-FPM: Permissions on UNIX socket

B.R. reallfqq-nginx at
Tue May 8 15:54:06 UTC 2012


After an update of my PHP package, now that I am using the new
configuration files, I am setting up my new PHP-FPM UNIX socket.

My UNIX socket is:
- Placed in /var/run/php-fpm.sock
- Owner & group: 'www-data'
- Filemode: 0660
After restarting PHP-FPM, the new socket has the correct attributes.

My Nginx configuration spawns workers with the 'nginx' user, which belongs
to the 'www-data' group (just checked through the 'groups' command).

However, Nginx can't connect to the PHP socket, it seems to encounter some
permissions problems: '*1 connect() to unix:/var/run/php-fpm.sock failed
(13: Permission denied) while connecting to upstream'

WHat am I doing wrong? Do I need something in particular in my Nginx
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list