Failed to create temporary file: /var/lib/mod_security/20xx

Today, the developer reported that the he is not able to upload some files.

As we checked, we were getting the following error on mod_security log.

Message: Input filter: Failed to create temporary file: /var/lib/mod_security/20231027-063404-ZTtZ3Bs-KzTcnh@YiPa2YAAAAAw-request_body-Yidqhf
Message: Audit log: Failed to lock global mutex: Permission deni

It looks like apache is getting denied while writing in to /var/lib/mod_security/ location.

As a quick fix, we have modified the mod_security.conf configuration file located at /etc/httpd/conf.d/mod_security.conf

    SecRequestBodyAccess On
    #SecTmpDir /var/lib/mod_security
    #SecDataDir /var/lib/mod_security
    SecTmpDir /tmp
    SecDataDir /tmp

Once modified, restarted the service with systemctl restart httpd command and the developer was able to upload the files.

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x
Scroll to Top