mod_security2: Failed to write to DBM file "/var/cache/modsecurity/ip": Invalid argument

Created:

2016-11-16 12:46:07 UTC

Modified:

2017-06-29 17:41:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

mod_security2: Failed to write to DBM file "/var/cache/modsecurity/ip": Invalid argument

Symptoms

Comodo ruleset in ModSecurity does not work with one of the following errors in modsec_audit.log or /var/www/vhosts/example.com/logs/error.log:

Message: collection_store: Failed to write to DBM file "/var/cache/modsecurity/ip": Invalid argument
Message: collection_store: Failed to access DBM file "/var/cache/modsecurity/ip": No such file or directory

Cause

Issue is with BruteForce rulset on a Comodo side.

Resolution

Install the latest version of comodo ruleset:

# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php –f UpdateModSecurityRuleSet

If it does not help, use one of the following workarounds:

1. Create /var/cache/modsecurity/ directory if it does not exist with the following permissions:

# ls -ld /var/cache/modsecurity/
drwxr-xr-x 2 apache root 4096 Jun 29 18:37 /var/cache/modsecurity/

2. If ip.dir and ip.pag files are present in /var/cache/modsecurity/, move them to a different location:

# mv  /var/cache/modsecurity/ip.dir ./
# mv /var/cache/modsecurity/ip.pag ./

3. De-activate BruteForce rule in Comodo Web Application Firewall

Have more questions? Submit a request
Please sign in to leave a comment.