Uploading via PHP scripts do not work after enabling ModSecurity.
ModSecurity does not log its actions to the log files in Plesk > Domains > example.com > Web Application Firewall > ModSecurity Log File.
In Event Viewer the following error could be found:
PLESK_INFO: [client 203.0.113.2:61900] ModSecurity: collections_remove_stale: Failed to access DBM file "C:/Program Files (x86)/Plesk/ModSecurity/vhosts/2C8F8FCE-68F2-40CD-9C39-8E53DF1E2981/temp/global": Access is denied. [hostname "SERVER-NAME"] [uri "/upload.php"] [unique_id "17654110550029763073"]/
Broken permissions for
Repair the permissions via Plesk Reconfigurator: Start > Plesk Reconfigurator > Check the Plesk files security box > Press Check.
If it does not help, fix the permissions manually:
- Make sure that the Subscription system user has all the required rights to the directory mentioned in the error: Right click on the folder > Properties > Security tab.
- A required windows account has a name like IWPD_#(system_user_name), for example
- System user name is available at Plesk > Domains > example.com > Web Hosting Access > System user > Username.