Articles in this section

Impossible to rename a domain: Unable to rename home of sysuser

Plesk for Linux kb: technical ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • The following error occurs when renaming a domain in Home > Domains > example.com > Hosting Settings:

    PLESK_ERROR: Error: Unable to rename home of sysuser with id=8: Unable to execute usermng: usermng[14704]: pam_unix(passwd:johndoe): password changed for johndoe usermod: user johndoe is currently used by process 21332

  • PHP handler is set to PHP-FPM server by nginx in Home > Domains > example.com > PHP Settings.
  • There are processes running under the user johndoe:

    # ps auxx | grep johndoe
    johndoe   21332  3.0  0.0 513636 16416 ?        S    01:22  0:00 php-fpm: pool example.com
    johndoe   21334  2.5  0.0 513504 15400 ?        S    01:22  0:00 php-fpm: pool example.com
    johndoe   21341  4.0  0.0 513504 15348 ?        S    01:22  0:00 php-fpm: pool example.com

Cause

The domain user johndoe is used by PHP-FPM processes

Resolution

Apply the following steps:

  1. Connect to the server via SSH;
  2. Change the PHP handler for the domain example.com in Home > Domains > example.com > PHP Settings to any non-FPM;
  3. Check if there are processes running for user johndoe:  

    # ps auxx | grep johndoe
    johndoe   21332  3.0  0.0 513636 16416 ?        S    01:22  0:00 php-fpm: pool example.com
    johndoe   21334  2.5  0.0 513504 15400 ?        S    01:22  0:00 php-fpm: pool example.com
    johndoe   21341  4.0  0.0 513504 15348 ?        S    01:22  0:00 php-fpm: pool example.com
    root     21347  0.0  0.0 112660  972 pts/0    S+  01:22  0:00 grep --color=auto club

  4. Kill such processes:

    # kill -9 21332 21334 21341

  5. Rename the domain in question.

  6. Set PHP handler for the domain example.com to PHP-FPM server by nginx in Home > Domains > example.com > PHP Settings.

Was this article helpful?

Comments

3 comments
Date Votes
  • I believe you can also just run `service plesk-php* stop` and restart them once renamed `service plesk-php* restart`

    Also even with no process shown with ps auxx, it still fails

    0
  • @Adrien Foulon, the specific actions on the article were chosen for two reasons: 1- processes can still get stuck for unknown reasons and they won't die even with "service xyz stop/start", so you would have to kill them manually anyways; and 2- the article procedure is designed to help minimize downtime for other websites, while "service plesk-php* stop" would kill all running PHP services, including ones which are not affected. Which is kinda okay on a maintenance window, but not OK on a big production server.

    Since the renaming still fails for you, there may be other factors affecting the server; please open a ticket and we'll be happy to assist you, 24/7.

    0
  • The problem was due to wp toolkit running the autoupdate process every minute via sw engine during the rename, I was able to successfully rename after disabling wp toolkit and restarting the sw-engine service

    0

Please sign in to leave a comment.