W-Mark Kubacki
May 09, 2012 01:34PM
2012/5/8 B.R. <reallfqq-nginx@yahoo.fr>:
>
> 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?

Although everything seems correct, let's double-check this. What's the
output of following commands?

# (stop, then start php-fpm)
# date +%Y-%m-%d\ %H:%M:%S
# ls -ald /var /var/run /var/run/php-fpm.sock
# getfacl /var/run/php-fpm.sock
# groups nginx
# groups www-data
# ps aux | grep -F -e php -e nginx

I bet it's just a small detail you've missed.

--
Mark

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 08, 2012 11:56AM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

W-Mark Kubacki May 09, 2012 01:34PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 09, 2012 01:46PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 09, 2012 07:14PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 09, 2012 07:54PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 10, 2012 06:34PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

Steve May 10, 2012 07:20PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 10, 2012 09:16PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

Steve May 10, 2012 09:36PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

Sergey Budnevitch May 11, 2012 12:32AM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

Sergey Budnevitch May 11, 2012 01:26AM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 11, 2012 12:10PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

Edho Arief May 11, 2012 12:16PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 11, 2012 12:26PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

Edho Arief May 11, 2012 12:58PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 11, 2012 01:42PM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

Sergey Budnevitch May 12, 2012 08:58AM

Re: Nginx + PHP-FPM: Permissions on UNIX socket

B.R. May 12, 2012 12:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 56
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready