php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67175 Change to the default listen.mode setting.
Submitted: 2014-05-01 23:37 UTC Modified: 2014-11-19 05:51 UTC
Votes:5
Avg. Score:2.8 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:0 (0.0%)
From: peter dot mescalchin at gmail dot com Assigned: remi (profile)
Status: Closed Package: FPM related
PHP Version: 5.5.12 OS: Ubuntu Linux 14.04LTS
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: peter dot mescalchin at gmail dot com
New email:
PHP Version: OS:

 

 [2014-05-01 23:37 UTC] peter dot mescalchin at gmail dot com
Description:
------------
It seems the default for listen.mode has changed. In docs it's still listed that the default chmod should be 0666, but it seems that starting PHP-FPM with PHP 5.5.12 now sets the chmod to be 0660.

http://www.php.net/manual/en/install.fpm.configuration.php#listen-owner

Is this intended behaviour? If so either documents and sapi/fpm/php-fpm.conf.in config comments need an update or I guess the default of 0660 needs to be corrected.


Test script:
---------------
Expected socket permissions (as with PHP 5.5.11):

$ ll /run/php5/
total 4
drwxr-xr-x  2 root root  80 May  2 09:28 ./
drwxr-xr-x 27 root root 980 May  2 08:02 ../
-rw-r--r--  1 root root   5 May  2 09:28 php-fpm.pid
srw-rw-rw-  1 root root   0 May  2 09:28 php-fpm.sock=



Returned result (as with PHP 5.5.12):

$ ll /run/php5/
total 4
drwxr-xr-x  2 root root  80 May  2 09:30 ./
drwxr-xr-x 27 root root 980 May  2 08:02 ../
-rw-r--r--  1 root root   5 May  2 09:30 php-fpm.pid
srw-rw----  1 root root   0 May  2 09:30 php-fpm.sock=



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-01 23:42 UTC] peter dot mescalchin at gmail dot com
Sorry that should be:

"Is this intended behaviour? If so either documents and sapi/fpm/php-fpm.conf.in config comments need an update or I guess the default of 0666 needs to be corrected."
 [2014-05-03 12:57 UTC] dblteb at yahoo dot com
After updating to 5.5.12, I received error 502 Bad Gateway. After some research, I changed to the listen = 127.0.0.1:9000 and my websites started working. When finding this bug report I found out it was a permissions problem also. 

Changed /etc/php-fpm/conf.d/www.conf and remove ; in front of listen.mode = 0666
and restarted php-fpm. Now I could update the other websites without any problems.
 [2014-05-05 11:30 UTC] miha dot vrhovnik at domenca dot com
It's because of fix for #67060.

You now need to uncommet the listen.owner and listen.group configuration directives.
 [2014-05-06 10:48 UTC] peter dot mescalchin at gmail dot com
If that is the case miha, then the default mode value needs to be updated in PHP docs for the FPM config page along with sapi/fpm/php-fpm.conf.in.

Note: looking at https://github.com/php/php-src/blob/master/sapi/fpm/php-fpm.conf.in it seems this has been changed to 0660 - which is good, just didn't make the 5.5.12 release.

So only the documentation needs updating at: http://www.php.net/manual/en/install.fpm.configuration.php#listen-owner
 [2014-05-06 10:52 UTC] peter dot mescalchin at gmail dot com
Just made the document update via the online editor. Can probably close this out.
 [2014-11-19 05:51 UTC] remi@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: remi
 [2014-11-19 05:51 UTC] remi@php.net
Documentation is fixed, closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 15 12:01:27 2024 UTC