Bug #77016 [Opn->Fbk]: Pool fails if user login name changes

From: Date: Sun, 28 Oct 2018 18:07:17 +0000
Subject: Bug #77016 [Opn->Fbk]: Pool fails if user login name changes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217731@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77016&edit=1

 ID:                 77016
 Updated by:         bukka@php.net
 Reported by:        hello at digitalnature dot eu
 Summary:            Pool fails if user login name changes
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            FPM related
 Operating System:   Ubuntu 18 (server)
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        bukka
 Block user comment: N
 Private report:     N

 New Comment:

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?


Previous Comments:
------------------------------------------------------------------------
[2018-10-15 17:33:45] 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-15 17:29:43] 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? 





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



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


Thread (4 messages)

« previous php.bugs (#217731) next »