Tech Enigma - http://www.techenigma.com
Mod Security Cron Errors
http://www.techenigma.com/articles/1772/1/Mod-Security-Cron-Errors/Page1.html
By Tarik Sabbagh
Published on 25/06/2008
 
After a recent upgrade i found several servers reporting cron errors via email - relating to Mod Security.

DBI connect('modsec:localhost','modsec',...) failed: Access denied for user 'modsec'@'localhost' (using password: YES) at /etc/cron.hourly/modsecparse.pl

It appeared as thought the modsec user didnt have acccess to the mod security database/table.

Read on for the fix.


After a recent MySQL upgrade i found several servers reporting cron errors via email - relating to Mod Security.

DBI connect('modsec:localhost','modsec',...) failed: Access denied for user 'modsec'@'localhost' (using password: YES) at /etc/cron.hourly/modsecparse.pl

It appeared as thought the modsec user didn't have access to the mod security database/table.

Solution:

If you are still using the old cPanel/Apache 1.3

  1. In WHM select Plug-ins
  2. Remove then re-install mod_security.

If you installed Apache2 mod_security with easyapache3 on cPanel 11 and you get the error

  1. Check the password at /etc/cron.hourly/modsecparse.pl
  2. Adjust the password of modsec user through WHM >  phpMyAdmin > Privileges

You should then find Mod Security working as normal.