Author Topic: mod_security not allow to upload files  (Read 289 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
mod_security not allow to upload files
« on: September 15, 2024, 06:54:21 AM »
Hi,
When I enable mod_security with Comodo WAF, when I try to upload files on my website I get this from website script:
https://ibb.co/ccFthQB
But my PHP upload limit is higher then the file that I want to upload...is like mod_Security ignore the php settings.

I don't get any errors in mod_security log... just this one:

 
Code: [Select]
ModSecurity: Access denied with code 403 (phase 1). Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "117"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "86.48.7.222"] [uri "/.env"] [unique_id "ZuXGOVr11PHxbzo61HtErgAAAIY"]
But I disabled the rules for id 210492...and now I don't get this error anymore, nothing in the logs...when I disable mod_security is working to upload files...
Someone know from where it is?

Thank you!

Offline
**
Re: mod_security not allow to upload files
« Reply #1 on: September 15, 2024, 11:36:41 AM »
Make sure the rule is disabled, make a new attempt to upload the file and then check the error log file of the website:

Code: [Select]
/usr/local/apache/domlogs/domlogs/DOMAIN.COM.error_log
if the new attempt fails.

Offline
*
Re: mod_security not allow to upload files
« Reply #2 on: September 15, 2024, 01:56:51 PM »
Make sure the rule is disabled, make a new attempt to upload the file and then check the error log file of the website:

Code: [Select]
/usr/local/apache/domlogs/domlogs/DOMAIN.COM.error_log
if the new attempt fails.

I solve it!
Was from 2 option settings, I had to add in mod_security.conf

Thank you!

Offline
*****
Re: mod_security not allow to upload files
« Reply #3 on: September 18, 2024, 04:55:53 PM »
It's always helpful to leave the actual, detailed solution in the thread for the sake of others searching for the same solution.

Offline
*
Re: mod_security not allow to upload files
« Reply #4 on: October 07, 2024, 06:42:35 PM »
Quote
I solve it!
Was from 2 option settings, I had to add in mod_security.conf
Thank you!

What is the solution followed? :( plz