/usr/sbin/userdel execution failed is shown while removing additional FTP account

Created:

2016-11-16 12:51:22 UTC

Modified:

2017-08-15 11:20:24 UTC

1

Was this article helpful?


Have more questions?

Submit a request

/usr/sbin/userdel execution failed is shown while removing additional FTP account

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Unable to remove additional FTP account/Web User from Plesk when there are php-fpm processes running on behalf of the system users of the subscription, the following error appears in Plesk:

PLESK_ERROR: Unable to execute usermng: usermng: /usr/sbin/userdel execution failed:
userdel: user ftpadd is currently used by process 5022
usermng: Unable to delete user:

Cause

Bug #PPPM-4225 . It is fixed in Plesk Onyx.

Resolution

Upgrade to the latest Plesk version .

If upgrade is not possible:

  1. Go to Home > Domains > example.com > PHP Settings and switch PHP handler to one with CGI/FastCGI support.
  2. Go to Home > Domains > example.com > FTP Access/Web USers and remove an account.
  3. Set back PHP handler in PHP Settings .

If steps above did not help remove this account directly from Plesk database with below steps:

  1. Backup Plesk database.
  2. Delete orphaned records:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -Dpsa -e "select account_id from sys_users where login='ftpadd'"
    +------------+
    | account_id |
    +------------+
    | 11 |
    +------------+

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -Dpsa -e "delete from accounts where id=11"
    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -Dpsa -e "delete from sys_users where login='ftpadd'"

  3. Remove the user from the system:

    # /usr/sbin/userdel ftpadd

Have more questions? Submit a request
Please sign in to leave a comment.