Nginx + PHP-FPM: Permissions on UNIX socket

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


Hello,

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
configuration?
---
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120508/bffba2c1/attachment-0001.html>


More information about the nginx mailing list