php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77016 Pool fails if user login name changes
Submitted: 2018-10-15 17:29 UTC Modified: 2018-11-18 22:42 UTC
From: hello at digitalnature dot eu Assigned: bukka (profile)
Status: No Feedback Package: FPM related
PHP Version: Irrelevant OS: Ubuntu 18 (server)
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-10-15 17:29 UTC] hello at digitalnature dot eu
Description:
------------
My setup:

PHP 5.6 and 7.2
Ubuntu Server 18.04.1
Nginx 1.14


When I create a new user, and set up the necessary .conf files, everything works fine.

But if I want to change the user login name (with usermod --login ...), I get an error telling me that the user is used by another process. Obviously php-fpm.

Makes sense. But if I stop the php-fpm services, then rename the user login name, then restart the services, then php-fpm gives me an error telling me that it cannot get the gid for the new user login.

ERROR: [pool sample6] cannot get uid for user 'sample6'

So basically I have no way of renaming the user login without breaking PHP.

Is there a workaround around this?

Is php-fpm storing guid somewhere? Why php-fpm cannot get the guid of an existing user at runtime instead? 




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-15 17:33 UTC] hello at digitalnature dot eu
I should mention that after the rename, I'm updating all the .conf files to reflect the change (they are generated automatically by my app).
 [2018-10-28 18:07 UTC] bukka@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: bukka
 [2018-10-28 18:07 UTC] bukka@php.net
This error means that FPM cannot get user when calling getpwnam:

http://man7.org/linux/man-pages/man3/getpwnam.3.html

It's uid not gid btw. I guess the user is not found in the password database if you do login. Are you sure that the user in the conf is correct and it's present in /etc/passwd?
 [2018-11-18 22:42 UTC] cmb@php.net
-Status: Feedback +Status: No Feedback
 [2018-11-18 22:42 UTC] cmb@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 06:01:27 2019 UTC