Articles in this section

Plesk Backup restores with a warning: Unable to create FTP account: The user jdoe already exists.

Plesk for Windows kb: technical

Applicable to:

  • Plesk for Windows

Symptoms

  • Backup in Plesk is restored with the below warning:

    PLESK_ERROR: Warning: Restore hosting "example.com"
    Failed deployment of ftpuser jdoe (domain example.com)
    Warning:
    Execution of "C:\Program Files (x86)\Plesk\bin\ftpsubaccount.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 the hosting or ftp_users tables:

    C:\> plesk db "select * from ftp_users where sys_user_id=123"
    Empty output

    C:\> 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

  1. Connect to the server via RDP.

  2. Create a backup of the psa database.

  3. 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'"

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.