Unable to add subdomain to the website: ProtDirUser_IIS::update() failed: Add Protected Directory user failed

Created:

2016-11-16 12:56:27 UTC

Modified:

2017-08-17 08:33:11 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to add subdomain to the website: ProtDirUser_IIS::update() failed: Add Protected Directory user failed

Applicable to:

  • Plesk 10.x for Windows
  • Plesk 11.x for Windows
  • Plesk 12.0 for Windows
  • Plesk 12.5 for Windows

Symptoms

Trying to add a subdomain to a website in Plesk, the following error message is shown:

PLESK_ERROR: ProtDirUser_IIS::update() failed: Add Protected Directory user failed: Url 'plesk-stat' is not protected.

The following SQL query returns a non-empty result:

C:\> "%plesk_bin%\\dbclient.exe" --direct-sql --sql="select * from protected_dirs where dom_id not in (select id from domains) limit 1;"

Cause

Database inconsistency.

Resolution

  1. Connect to the server using RDP and create 'psa' database backup.

  2. Remove orphaned records in psa.protected_dirs which belong to non-existent domains:

    MYSQL_WIN: mysql> begin;
    mysql> delete from protected_dirs where dom_id not in (select id from domains);
    mysql> commit;

  3. Reconfigure website using the following commands:

    C:\> "%plesk_cli%\repair.exe" --reconfigure-web-site -web-site-name example.com
    C:\> "%plesk_cli%\websrvmng.exe" --remove-sites-cache
    C:\> "%plesk_cli%\repair.exe" --repair-webspace-security -webspace-name example.com
    C:\> "%plesk_bin%\websrvmng.exe" --remove-sites-cache

  4. Try to disable/enable plesk-stat password protection.

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