• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Deleting FTP user from Plesk interface failure

gennolo

Basic Pleskian
I am on Centos 7.2 / Plesk 12.5 box

I often create restricted FTP users related to domains to let customers doing stuff on website without viewing the actual websites.

It happens sometimes that when I try to delete those FTP accounts from Domains -> FTP Accounts
I got an error message saying that that "user cannot be deleted because being used by a process".

This operation lead to a Plesk inconsistency because :

- The user is equally removed from Plesk FTP users database (it is not listed anymore after first deletion)
- The user is still able to do FTP connections and of course is not removed from etc/passwd

Doing a manual shell # userdel xxxx
return me the same error :

userdel: user xxxx is currently used by process 1433

Doing ps auxf | grep 1433
1433 12.8 2.0 597776 80680 ? R 11:12 0:12 | \_ /opt/plesk/php/5.6/bin/php-cgi -c /var/www/vhosts/system/domain_name.tld/etc/php.ini

So it appears that PHP is locking the created FTP users in some way.

How to deal with it ? How can I safely remove those users without restarting PHP / webserver ?
 
Thank you for your prompt reply.

I followed the KB to remove the orphaned entries from PSA database - But I still encounter the user lock when it comes to do last step

# userdel xxxxx
userdel: user xxxx is currently used by process 5146

Therefore I cannot remove the user from the system as indicated.

Do I have to forcefully stop all php-fpm subscription related process (causing potential services downtime)
in order to proper delete the user ?

No other workarounds ?
 
I think that you can kill corresponding processes which can be found with

# ps aux | grep php-fpm

for FTP user deletion properly. And just wait when mentioned PPPM-4225 will be fixed in the one of nearest updates.
 
IgorG : Everytime I try to kill the process, another one is spawning preventing me to deleting the user :

# userdel xxxxxx
userdel: user xxxxxx is currently used by process 48083
# kill 48083
# userdel xxxxxx
userdel: user xxxxxx is currently used by process 48084
# kill 48084
# userdel xxxxxx
userdel: user xxxxxx is currently used by process 48086
# kill 48086
# userdel xxxxxx
userdel: user xxxxxx is currently used by process 48090

An addition : after additional investigation , the involved subscription is using php-cgi (no fpm at all) so the scenario described in https://kb.plesk.com/en/128570 is not my case.
In fact the "locking" respawning process is -> /opt/plesk/php/5.6/bin/php-cgi -c /var/www/vhosts/system/domain_name.tld/etc/php.ini
 
Back
Top