|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68591 Configuration test does not perform uid lookups
Submitted: 2014-12-11 13:57 UTC Modified: 2014-12-11 14:20 UTC
From: bruno dot premont at restena dot lu Assigned:
Status: Open Package: FPM related
PHP Version: 5.5.19 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-12-11 13:57 UTC] bruno dot premont at restena dot lu
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:

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

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

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-11 14:20 UTC] bruno dot premont at restena dot lu
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
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jun 25 14:01:23 2021 UTC