Symptoms
-
Backup in Plesk is restored with the below warning:
Warning: Restore hosting "example.com"
Failed deployment of ftpuser jdoe (domain example.com)
Warning:
Execution of "C:Program Files (x86)Pleskbinftpsubaccount.exe" --create jdoe -domain example.com -passwd "" -passwd_type sym -access_write true -access_read true -ignore-nonexistent-options failed with return code 1.
Stderr is
Unable to create FTP account: The user jdoe already exists. -
The domain's hosting type was switched from website hosting to no hosting and back.
-
The user from the error exists in the
sys_users
table:C:> plesk db "select * from sys_users where login like '%jdoe%'"
+-----+---------------+---------+------------+--------------------------------------------+-------+-------+
| id | serviceNodeId | login | account_id | home | shell | quota |
+-----+---------------+---------+------------+--------------------------------------------+-------+-------+
| 123 | 1 | jdoe | 1822 | C:/Inetpub/vhosts/example.com | | 0 |
+-----+---------------+---------+------------+--------------------------------------------+-------+-------+ -
No users with id
123
can be found in thehosting
orftp_users
tables:C:> plesk db "select * from ftp_users where sys_user_id=123"
Empty outputC:> plesk db "select * from hosting where sys_user_id=123"
Empty Output
Cause
Database inconsistency, an orphan record for the FTP user exist on the sys_users
table.
Resolution
-
Connect to the server via RDP.
-
Open a Command prompt and execute the below command to remove the orphan user, where "jdoe" is replaced by the user from the restoration warning:
C:> plesk db "delete from sys_users where login='jdoe'"