skip to Main Content

Good afternoon,
I have recently purchased a server with Plesk 12 as the Control Panel.
I don’t have much experience using Plesk.

For testing purposes, I created a simple ASP.NET project which tries to read/write from a txt, as shown below:

String logPath = @"C:inetpubvhostsxxx.comhttpdocslog_application_error.txt";
StreamWriter textWriter = new StreamWriter(logPath, true);

When the StreamWriter instance is created, I get the following error:

System.UnauthorizedAccessException: Access to the path 'C:inetpubvhostsxxx.comhttpdocslog_application_error.txt' is denied.

I tried granting read/write permissions to the txt file, and even granted Full Control to “Everyone”, but the result was the same.

Plesk seems to hide everything so that it is handled through the Control Panel. I don’t see any Applications Pools on the IIS so I am not even sure what is the identity it is running under.

Any help would be greatly appreciated.

2

Answers


  1. Try to fix it with following commands:

    cacls C:WindowsassemblyGAC_MSIL /E /R psacln /T /C

    cacls C:WindowsassemblyGAC_MSIL /E /R psaadm /T /C

    Login or Signup to reply.
  2. Try to set “Additonal write/modify permissions” at “Hosting settings” of your domain:

    Plesk write permissions

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search