Plesk

Unable to attach files in a WebMail or any file upload when ModSecurity is active: An error occurred! File upload failed

Symptoms

Cause

Upload file process fails because ModSecurity SecRequestBodyLimit is reached.

Resolution

  1. Log in to Plesk

  2. Navigate to Tools & settings > Web Application Firewall (ModSecurity) > Settings:

  3. Add the following line into the text field Custom directives:

    SecRequestBodyLimit 67108864

  4. Press Apply