php.net |  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
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: bruno dot premont at restena dot lu Assigned:
Status: Closed Package: FPM related
PHP Version: 5.5.19 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bruno dot premont at restena dot lu
New email:
PHP Version: OS:

 

 [2014-12-11 13:57 UTC] 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

Patches

Pull Requests

History

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
 [2022-12-26 14:16 UTC] git@php.net
Automatic comment on behalf of bukka
Revision: https://github.com/php/php-src/commit/21d8980d274e38ea8f9987498dde5ddb1b4b2f90
Log: Fix bug #68591: Configuration test does not perform UID lookups
 [2022-12-26 14:16 UTC] git@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC