Today, the VPS on the php5.3 upgrade to the php5.4, I use the NGINX+PHP-FPM architecture, nginx through the PHP-FPM socks file to connect.
Result Error:
Connect () to Unix:/tmp/php-cgi.sock failed (13:permission denied) while connecting to upstream
I checked./tmp/php-cgi.sock found that the file owner is root, and nginx and php-fpm are WWW users to run, supposedly, this sock file should also be www.
It was later found that there was a configuration in php-fpm.conf:
; Set Permissions for UNIX sockets, if one is used. In Linux, Read/write
; Permissions must is set in order to allow connections from a Web server. Many
; Bsd-derived systems allow connections regardless of permissions.
; Default Values:user and group are set as the running user
; Mode is set to 0660
; listen.owner = www
; listen.group = www
; Listen.mode = 0660
Strangely, by default, you should use the user and group configuration items to set permissions, but not in fact. Anyway, it solves the problem by manually specifying the configuration here.
; Set Permissions for UNIX sockets, if one is used. In Linux, Read/write
; Permissions must is set in order to allow connections from a Web server. Many
; Bsd-derived systems allow connections regardless of permissions.
; Default Values:user and group are set as the running user
; Mode is set to 0660
Listen.owner = www
Listen.group = www
; Listen.mode = 0660
Nginx Connection php-fpm sock file failed 502