Articles in this section

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

Plesk for Windows kb: technical

Applicable to:

  • Plesk for Windows

Symptoms

  • ModSecurity audit.log file is not rotated for example.com domain in Plesk > Domains > example.com > Logs > Manage log files.
  • The Log rotation option is enabled in Domains > example.com > Logs > Log rotation.
  • Plesk daily maintenance task executed properly on the server, at the configured time and without errors.

Cause

Incorrect permissions for the C:\Program Files (x86)\Plesk\ModSecurity\vhosts\domain_GUID\logs folder and C:\Program Files (x86)\Plesk\ModSecurity\vhosts\domain_GUID\logs\audit.log file.

Resolution

  1. Log into the server via RDP.
  2. Open reconfigurator.exe file in %plesk_dir%admin\bin 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:
    mceclip1.png

 

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%ModSecurity\vhosts\domain_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:
    mceclip1.png
  6. Open the logs folder within the same directory, right-click audit.log file > Properties > Security > Advanced > Permissions set the permissions as below:
    mceclip2.png

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

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.