Applicable to:
- Plesk for Linux
Symptoms
-
On a Plesk for Linux server, different operations like:
- renaming the subscription's system user in Domains > example.com > Hosting & DNS > Hosting;
- modifying settings of an additional FTP user in Domains > example.com > FTP;
- renaming a domain;
- restoring a Plesk backup;
- deleting a web user;
fail with the error like below which can be also found in the log file
/var/log/plesk/panel.log
and/or in the "Network" tab of the browser's DevTools:Internal server error
SysUser::update() failed: Unable to execute usermng: usermng: /usr/sbin/usermod execution failed: usermod: user johndoe is currently used by process 4758 usermng: Unable to modify user: johndoe
Unable to execute usermng: usermng: /usr/sbin/userdel execution failed: userdel: user johndoe is currently used by process 4382 usermng: Unable to delete user: johndoe
usermod: user johndoe is currently used by process 2367804
usermng: Unable to modify user: johndoe -
The PHP handler FPM application is set as a PHP handler in the menu Domains > example.com > PHP.
Cause
Product issue:
-
#PPPM-10717 "Fixed the issue where renaming subscription system users and additional FTP users could sometimes fail with the âuser xxx is currently used by process xxxxxâ error."
Fixed in:- Plesk Obsidian 18.0.61 14 May 2024 (Linux)
Resolution
Workaround
Until the bug is fixed, use the workaround:
-
Perform one of the following actions in each domain of the affected subscription:
-
Change the PHP handler to FastCGI application: go to Domains > example.com > PHP and in the option run PHP as, change the handler from FPM application to FastCGI application, and click OK or Apply at the bottom of the page.
-
Disable PHP: go to Domains > example.com > PHP, disable the option PHP support, and click OK or Apply at the bottom of the page.
-
-
Suspend the affected subscription.
-
Connect to the server using SSH.
-
If Cgroups Manager is installed and enabled, disable it:
# plesk sbin resctrl --disable
-
Execute the following command, replacing
$username
with the name of the subscription's system user:# killall -TERM -u $username; sleep 1; killall -KILL -u $username
Note: to find the subscripton's system user name, check the field Username under System user's credentials in the menu Domains > example.com > Hosting & DNS > Hosting.
-
In the Plesk interface, perform the operation that was failing.
-
Revert changes made in steps 2, 3, and 5.
Note: for reverting step 5, execute the command
plesk sbin resctrl --enable
.
OLD, was replaced by request from R&D, email thread "[KB update request] 12377460666775 - usermod: user is currently used by process
".
Until the bug is fixed, use the workaround:
-
Go to Domains > example.com > PHP Settings and switch the PHP handler from FPM to CGI/FastCGI one.
Note: If only FPM by nginx is present in Domains > example.com > PHP Settings, enable the option Proxy Mode in Domains > example.com > Apache and nginx Settings.
-
Perform the operation that was failing.
-
Set PHP-FPM handler back in Domains > example.com > PHP Settings
-
If the issue still persists, temporarily suspend the subscription and try again.
Comments
2 comments
Sorry but the resolution in the article is misleading. usedmod fails because the user has active processes.
Resolution:
ssh into plesk and execute the following command to terminate user processes.
After user processes are terminated usermod won't fail anymore.
None of the solutions in this article worked for us. It appears that Plesk is spawning a user process *just* prior to trying to change the username on the subscription/system user. Selman's solution above only worked when we triggered the username change, then repeatedly ran the command while the change was in progress and did so until success.
Please sign in to leave a comment.