Php-fpm在启动时破坏了我的套接字权限

I've installed Apache with FastCgi module, and PHP-fpm on a Centos server.

I configure FastCgi with an external server using the socket option:

FastCgiExternalServer /var/www/cgi-bin/test/php.fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization -idle-timeout 3600

When I start my services (httpd and php-fpm) I got an error 500 when I request my helloWorld-test-page. But if I add write access to every user on my php5-fpm.sock file my hello world page works fine ! So I thought it's the good configuration...

But as soon as my services restart I saw my socket's permissions automatically updated and then my test-page doesn't works anymore:

srw-rw----   1 root   root      0 Nov  9 23:30 php5-fpm.sock

What is the good configuration for a socket file, and do you know what I should configure to make it definitive?

You can control the permissions via the php-fpm "pool" config:

# /etc/php-fpm.d/www.conf
listen.owner = apache
listen.group = apache
listen.mode = 0666

The owner and group should line-up with the owner of the httpd processes.