Plesk

Unable to open log of particular domain in Plesk: Internal error: Unable to open log file

Symptoms

  1. Unable to open Subscriptions > example.com > Logs

    external error:
    Unable to open log file:
    Message Unable to open log file
    File PhpFopen.php
    Line 94
    Type PleskFatalException

  2. %plesk_dir%adminlogsphp_error.log contains errors

    PHP Warning: finfo_file(C:Inetpubvhostsexample.comlogsiisW3SVC7u_ex170101.log): C; File: C:Program Files (x86)ParallelsPleskadminpli bLogBrowserReaderPhpFopen.php, Line: 29
    ERR [1] Exception: PHP Warning: finfo_file(C:Inetpubvhostsexample.comlogsiisW3SVC7u_ex170101.log): failed to open stream: Permission denied;File: C:Program Files (x86)Parall elsPleskadminplibLogBrowserReaderPhpFopen.php, Line: 29

    Or:

    PHP Warning: finfo_file(C:Inetpubvhostsexample.comlogsiisW3SVC7u_ex170101.log): C; File: C:Program Files (x86)ParallelsPleskadminpli bLogBrowserReaderPhpFopen.php, Line: 94
    ERR [1] Exception: PHP Warning: finfo_file(C:Inetpubvhostsexample.comlogsiisW3SVC7u_ex170101.log): failed to open stream: Permission denied;File: C:Program Files (x86)Parall elsPleskadminplibLogBrowserReaderPhpFopen.php, Line: 94

    Or:

    DEBUG [util_exec] Error code: 0, stdout: <XmlError Error="Access is denied." ErrorCode="access_is_denied" ErrorDetails="Unable to read directory (C:Inetpubvhostsexample.comlogsiisW3SVC36*.*): (5) Access is denied."/>

Cause

Incorrect permissions on %plesk_vhosts%example.com.plesk.Security.

Resolution

  1. Connect to Plesk server using RDP.
  2. Rename or remove the %plesk_vhosts%example.com.plesk.Security. file.
  3. Restore domain file and folder permissions using via command line:

    C:>"%plesk_cli%repair.exe" --repair-webspace-security -webspace-name example.com -all-filesystem-objects

    To restore it for all domains, execute below commands:

    C:> plesk db -Ne "select name from domains where htype='vrt_hst'" > C:domains.txt

    C:> for /f "tokens=*" %d in ('type C:domains.txt') do "%plesk_cli%repair.exe" --repair-webspace-security -webspace-name %d -all-filesystem-objects

  4. If this did not help, add required permissions on the folder mentioned in the error in %plesk_dir%adminlogsphp_error.logpsaadm user must have List folder content for this folder and subfolders and Read for files only permissions:
Exit mobile version