The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

modsecparse.pl issue

Discussion in 'Security' started by Serverji, Feb 5, 2010.

  1. Serverji

    Serverji Registered

    Joined:
    Dec 6, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have a VPS with cPanel 11.25.0-R43252 - WHM 11.25.0 - X 3.9
    CENTOS 5 i686

    every hour i am getting a cron error

    /etc/cron.hourly/modsecparse.pl:

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


    I checked MySQL database and there is no db with the name of modsec.

    So, how to fix this issue ?

    Thanks to anyone who can help me here.
     
  2. zacharooni

    zacharooni Member

    Joined:
    Feb 11, 2010
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    DataCenter Provider
    Hello,

    Look in the modsecparse.pl file for the credentials, then as root in SSH:

    mysqladmin create modsec
    mysql
    mysql> GRANT ALL PRIVILEGES ON modsec.* TO 'modsec'@'localhost' IDENTIFIED BY 'PASSWORD';
    mysql> FLUSH PRIVILEGES;
    mysql> quit
    /etc/init.d/mysql restart
    /usr/local/cpanel/startup

    Replace PASSWORD with the password in modsecparse.pl
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Are both mod_security and mod_unique_id installed in the Apache configuration?

    The following commands may be used to help verify the installation status and confirm if they are loading:
    Code:
    # find /usr/local/apache -regex ".*modsec.*\|.*mod_security.*" | sort
    # /usr/local/apache/bin/httpd -l | grep "unique_id"
    # /usr/local/apache/bin/httpd -M | egrep "sec|unique_id"
    I recommend to try correcting the issue by running EasyApache while ensuring to enable mod_security in the build profile, at the very least it should ensure there is a working mod_security installation. If this alone does not fully alleviate the reported symptom please consider submitting a support request so that we can examine the system and determine why the issue is occurring; if submitting a ticket please send me a PM referencing this thread and the ID number of your support request so that I may follow-up internally.
     
Loading...

Share This Page