Plesk

ModSecurity audit.log file is not rotated for domain in Plesk

Symptoms

Cause

Incorrect permissions for the C:Program Files (x86)PleskModSecurityvhostsdomain_GUIDlogs folder and C:Program Files (x86)PleskModSecurityvhostsdomain_GUIDlogsaudit.log file.

Resolution

  1. Log into the server via RDP.
  2. Open reconfigurator.exe file in %plesk_dir%adminbin directory.
  3. Press Repair Plesk installation:
    mceclip1.png
  4. Select the Plesk Server Accounts, Plesk File Security and Plesk Virtual Hosts Security options and press the Check button:

 

Manual Solution

  1. Log into the server via RDP.
  2. Start a command prompt as an Administrator.
  3. Run the command below to get domain GUID:

    C:> plesk db -Ne "select guid from domains where name='example.com'"

    Note: in the command above replace example.com with the name of the required domain

  4. Open %plesk_dir%ModSecurityvhostsdomain_GUID directory.

    Note: in the path above replace domain_GUID using the output of the command from step №3.

  5. Right-click logs directory > Properties > Security > Advanced > Permissions and set the same permissions as in the following screenshot:
  6. Open the logs folder within the same directory, right-click audit.log file > Properties > Security > Advanced > Permissions set the permissions as below:

    Note: in the examples above instead of IWPG_johndoe should be the system user of the affected subscriptions.