Skip to main content

Easyapache 4 + Modsecurity + Mod_ruid2 errors

Comments

10 comments

  • cPanelMichael
    Hello, Under Mod_Ruid2/MPM-ITK, the Apache process is run as the cPanel user, and therefore does not have access to obtain a lock on the GeoIP database. This is documented at: Apache Module: ModSecurity - EasyApache 4 - cPanel Documentation Additional discussion of this topic is found at: ModSecurity + MPM ITK compatibility - inconsistent documentation Thank you.
    0
  • Marius
    Hello, Under Mod_Ruid2/MPM-ITK, the Apache process is run as the cPanel user, and therefore does not have access to obtain a lock on the GeoIP database. This is documented at:

    In my first post I've specified: Server MPM: prefork(cPanel default) - > So this apply to prefork too or only to MPM-ITK? Far as I know MPM prefork and MPM ITK are 2 different modules.
    0
  • cPanelMichael
    In my first post I've specified: Server MPM: prefork(cPanel default) - > So this apply to prefork too or only to MPM-ITK? Far as I know MPM prefork and MPM ITK are 2 different modules.

    Hello, This was a blanket statement to note the Apache process is run as the cPanel user when using either Mod_Ruid2 or MPM-ITK. In your case, the system uses Mod_Ruid2. Thanks!
    0
  • Marius
    Ok, I understand that in my case the system uses Mod_Ruid2. But nobody from staff answer to my main question: Conflict Modsecurity + mod_ruid2 is solved or not in WHM?(I provided log & all the information's). Thanks!
    0
  • cPanelMichael
    But nobody from staff answer to my main question: Conflict Modsecurity + mod_ruid2 is solved or not in WHM?(I provided log & all the information's).

    ModSecurity: Geo Lookup: Failed to lock proc mutex:

    Hello, This issue will still occur when using Mod_Ruid2 and Mod_Security. The topic is discussed in more detail on the URL referenced in the earlier response: ModSecurity + MPM ITK compatibility - inconsistent documentation Note that the title references MPM ITK, but the same issue applies to Ruid2. Thank you.
    0
  • joako
    So what needs to be done to fix this? Does this new version fix it? OWASP has released version 3 of their Core Rule Set for ModSecurity". This new version of the ruleset provides enhanced protection for a number of attacks on web servers. To install the new set of rules or upgrade from the older version, go to Home " Security Center " ModSecurity" Vendors.
    0
  • cPanelMichael
    So what needs to be done to fix this? Does this new version fix it? OWASP has released version 3 of their Core Rule Set for ModSecurity". This new version of the ruleset provides enhanced protection for a number of attacks on web servers. To install the new set of rules or upgrade from the older version, go to Home " Security Center " ModSecurity" Vendors.

    Hello @joako, The issue originates from a bug with Mod Security itself, however we recently have begun working on a solution to ensure Mod Security correctly logs ModSecEvents when using MPM-ITK or RUID2, so that persistent logging works properly. You can find the most recent update at: ModSecurity + MPM ITK compatibility - inconsistent documentation Thank you.
    0
  • eXite
    We fixed this by manually editing /etc/apache2/conf.d/modsec/modsec2.cpanel.conf and adding the following line: SecDataDir "/var/log/secdatadir"
    (or changing the existing /var/cpanel/secdatadir to that path) Afterwards run the following commands: $ sudo cp -R /var/cpanel/secdatadir /var/log/ $ sudo chmod 1733 /var/log/secdatadir $ sudo chown -R nobody:nobody /var/log/secdatadir $ sudo chmod ugo+rw /var/log/secdatadir/*
    Then change any modsec setting in WHM under [ModSecurityTM Configuration] to trigger the regeneration of the config and you're all set. No more errors.
    0
  • sonicsam
    We fixed this by manually editing /etc/apache2/conf.d/modsec/modsec2.cpanel.conf and adding the following line: (or changing the existing /var/cpanel/secdatadir to that path) Afterwards run the following commands: Then change any modsec setting in WHM under [ModSecurityTM Configuration] to trigger the regeneration of the config and you're all set. No more errors.

    I tried this but as soon as I change the modsec settings in whm the config file reverts to the old path.
    0
  • cPanelMichael
    I tried this but as soon as I change the modsec settings in whm the config file reverts to the old path.

    You may find the following thread helpful: ModSecurity - SecDataDir Thank you.
    0

Please sign in to leave a comment.