Bug #68591 [Opn]: Configuration test does not perform uid lookups

From: Date: Thu, 11 Dec 2014 14:20:09 +0000
Subject: Bug #68591 [Opn]: Configuration test does not perform uid lookups
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189015@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68591&edit=1

 ID:                 68591
 User updated by:    bruno dot premont at restena dot lu
 Reported by:        bruno dot premont at restena dot lu
 Summary:            Configuration test does not perform uid lookups
 Status:             Open
 Type:               Bug
 Package:            FPM related
 Operating System:   Linux
 PHP Version:        5.5.19
 Block user comment: N
 Private report:     N

 New Comment:

Probably fpm_unix_resolve_socket_premissions() and fpm_unix_conf_wp() from fpm_unix.c would have to
be called fpm_conf_process_all_pools() in fpm_conf.c.

However I'm not sure how this might interfere with support for non-unix platforms.

Other affected PHP version: 5.3 and 5.4 series


Previous Comments:
------------------------------------------------------------------------
[2014-12-11 13:57:29] bruno dot premont at restena dot lu

Description:
------------
When calling php-fpm -y $configfile -t to check configuration file it reports success though php-fpm
would fail to startup (or exit if sent SIGUSR2 to reload).

In fpm error log I find the following error:
[11-Dec-2014 14:34:59] NOTICE: Reloading in progress ...
[11-Dec-2014 14:34:59] NOTICE: reloading: execvp("/usr/lib/php5.5/bin/php-fpm",
{"/usr/lib/php5.5/bin/php-fpm", "-y",
"/etc/php/fpm-php5.5/php-fpm.conf"})
[11-Dec-2014 14:34:59] ERROR: [pool site] cannot get uid for user 'siteuser'
[11-Dec-2014 14:34:59] ERROR: FPM initialization failed

This problem case should be caught by php-fpm -t call.
Otherwise reloading after "successful" configuration test ends up in fpm exiting (and thus
service downtime).

Test script:
---------------
in fpm.conf:

[site]
user = siteuser
group = sitegroup
listen = /path/to/unix/socket
listen.owner = siteuser
listen.group = webserver
listen.mode = 0660
...

Expected result:
----------------
php-fpm -t should report an issue

Actual result:
--------------
php-fpm -t reports success


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68591&edit=1


Thread (3 messages)

« previous php.bugs (#189015) next »