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

Refers to:

  • Plesk 10.4 for Windows
  • Plesk 11.0 for Windows
  • Plesk 11.5 for Windows
  • Plesk 12.0 for Windows
  • Plesk 12.5 for Windows

Created:

2016-11-16 12:56:27 UTC

Modified:

2016-12-21 19:35:19 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

Symptoms

When trying to add a subdomain to a website in Plesk, the following error message is displayed:

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

The following SQL query returns a non-empty result:

"%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. Create 'psa' database backup according to article KB881

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

    mysql> begin;
    Query OK, 0 rows affected (0.00 sec)

    mysql> delete from protected_dirs where dom_id not in (select id from domains);
    Query OK, 24 rows affected (0.00 sec)

    mysql> commit;
    Query OK, 0 rows affected (0.01 sec)
  3. Reconfigure website using the following commands:

    "%plesk_cli%\\repair.exe" --reconfigure-web-site  -web-site-name example.com

    "%plesk_cli%\\websrvmng.exe" --remove-sites-cache

    "%plesk_cli%\\repair.exe" --repair-webspace-security -webspace-name example.com
  4. Try to disable/enable plesk-stat password protection.

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