Nginx + PHP-FPM: Permissions on UNIX socket

Edho Arief edho at myconan.net
Fri May 11 16:14:58 UTC 2012


On Fri, May 11, 2012 at 11:08 PM, B.R. <reallfqq-nginx at yahoo.fr> wrote:
> OK, thanks Sergey!
> That seemed to be a gross bug, I am glad to know that's only my mistake. :o)
>
> What do you mean by 'add www-data as supplementary group to nginx user'?
> At the moment, nginx has www-data as its primary group.
>
> - Can it work if I don't specify any group in the Nginx config file (default
> group seems to be nobody, not any nginx user groups)?
> - Or should I always specify a group in the configuration, even if the nginx
> user already belongs to it?
> ---

It's weird, I certainly have no problem with such setup.

$ ls -l .php.sock-*
srw-rw---- 1 bacchanallia www-data 0 May  9 12:27 .php.sock-bacchanallia=
srw-rw---- 1 edho         www-data 0 May  9 12:27 .php.sock-edho=
srw-rw---- 1 genshiken    www-data 0 May  9 12:27 .php.sock-genshiken=
$ id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)
$ id edho
uid=1000(edho) gid=1000(edho)
groups=1000(edho),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev)
$ ps axuw|grep nginx
root     32448  0.0  0.0  65424   640 ?        Ss   Apr30   0:00
nginx: master process /usr/sbin/nginx
www-data 32449  0.0  0.3  65828  3348 ?        S    Apr30   0:59
nginx: worker process
www-data 32450  0.0  0.4  65572  4768 ?        S    Apr30   0:57
nginx: worker process
www-data 32451  0.0  0.5  66320  5844 ?        S    Apr30   1:02
nginx: worker process
www-data 32452  0.0  0.3  65428  3420 ?        S    Apr30   0:59
nginx: worker process
www-data 32453  0.0  0.4  66324  4356 ?        S    Apr30   1:01
nginx: worker process
$



More information about the nginx mailing list