×


Plesk error Access to the path is denied - Fix it Now

Are you facing the error, Plesk: Access to the path is denied?

This guide is for you.


Plesk: Access to the path is denied happens when we access the .aspx file on the Windows server with the Plesk control panel or when the backup runs in the server. This is related to permission issues.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve related Plesk queries.


Nature of Plesk: Access to the path is denied 

Generally, this error is due to incorrect permissions. The error message is as follows:

Access to the path XXXX is denied

Moving ahead, let us see few instances where this error occurs.


a. While accessing .aspx file on Windows server with Plesk control panel

For instance, when we access the URL, http://example.com/testfolder/test.aspx produces the error:

Access to the path %plesk_vhosts%example.com\httpdocs\testfolder is denied

If the required system user and/or permissions do not configure properly for the directory %plesk_vhosts%example.com\httpdocs\testfolder in Plesk, it might cause this error.


In order to solve this, we suggests following the below steps:

1. Connect to the server via RDP.

2. Then repair permissions for the virtual host directory for the domain (example.com).


If this does not help, set the permissions for the subfolder manually:

1. Log in to Plesk.

2. Go to Domains > example.com > Virtual Directory > test folder > Directory Access Permissions and ensure necessary user rights.

3. If the application pool group is missing and it is not possible to add it via Plesk, add it directly on the file system using Windows functionality.

4. The name of the pool group should be IWPG_<sys_user>, where <sys_user> should replace with the actual system user of the subscription.


b. When Plesk backup completes with warnings

We can see that the backup completes with warnings:

WARNING: (domain object ‘example.com’) [e4404190-b0b5-425e-a309-500e258cfe97]: Unable to get attributes of the file C:\Inetpub\vhosts\example.com\httpdocs\img\originais\photo.jpg: Access is denied. The file will not be archived.

In addition, the following error is seen in %plesk_dir%admin\conf\php_error.log:

psacontentfile.FileAccessException: Can not open for reading file “C:/Inetpub/vhosts\example.com\httpdocs/file.jpg”. Access to the path ‘C:\Inetpub\vhosts\example.com\httpdocs/file.jpg’ is denied.
System user of a subscription does not have access to this file:
PS Get-Acl C:\Inetpub\vhosts\example.com\httpdocs\file.jpg | Format-List
Path : Microsoft.Powershell.Core\FileSystem::C:\Inetpub\vhosts\example.com\httpdocs\file.jpg
Owner : WIN-TESTWM\S-1-5-21-2700000000-1230000000-1950000000-1084
Group : WIN-TESTWM\None
Access : NT AUTHORITY\SYSTEM Allow FullControl
Audit :
<…>

OR

Website prompting for credentials when the dedicated application pool is enabled in Domains > example.com > Dedicated IIS App pool for website > Switch on.

Failed requests tracing shows that there are Access is denied records for some domain's files.

This can be due to wrong permissions.


In order to solve this, follow the following steps:

1. Connect to the server via RDP.

2. Open PowerShell.

3. Then repair permissions for the subscription:

PS plesk repair –repair-webspace-security -all-filesystem-objects -webspace-name example.com


[Still, stuck with this Plesk error? We can help you fix. ]


Conclusion

This article covers Plesk Access to the path is denied error. For instance, while trying to access http://example.com/testfolder/test.aspx, it produces the error:

Access to the path %plesk_vhosts%example.com\httpdocs\testfolder is denied

This signifies that the Required system user and/or permissions are not configured properly for the directory %plesk_vhosts%example.com\httpdocs\testfolder in Plesk.


To fix this Plesk error:

1. Connect to the server via RDP.

2. When default permissions on the domain folder are lost, the following actions can be performed to restore them:

i. For Plesk 12.5, Onyx and Obsidian:

"%plesk_cli%\repair.exe" --repair-webspace-security -webspace-name example.com

If it is necessary to repair permissions for all domains, the following command should be used:

"%plesk_cli%\repair.exe" --repair-all-webspaces-security

Also, Plesk Reconfigurator could be used: in the Windows Start menu, select All Programs > Plesk > Plesk Reconfigurator and select Repair Plesk installation > Plesk Virtual Hosts Security > Check .

ii. For Plesk before 12.5:

Go to the Domains page, mark the required domains, and click on the Check permissions button.

Then uncheck the Check-only mode checkbox and click OK .