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.

ModSecurity: collection_store: Failed to access DBM file

Discussion in 'Security' started by esultanzada, Jul 12, 2014.

  1. esultanzada

    esultanzada Active Member

    Joined:
    May 8, 2013
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I have problem with mod security, i installed whmcs when i want to edit General Setting and click on save i got the following error:

    when i check the error log this is the error log:

    please give me advise to fix this problem?
     
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    941
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    First, check that /tmp is set to 1777 permissions (as it should be).

    Second, look at the files in /tmp. for a collection store called "ip", there should be an ip.dir file and an ip.pag file.

    Assuming you are not using mod ruid2, these collections should be owned by "nobody" (the Apache user.) If you are using mod_ruid2 you may need to make sure easyapache is up to date and re-run a build.

    Most likely though, either /tmp itself, or ip.dir or ip.pag has incorrect permissions. Make sure those files are writeable by the web server.
     
  3. esultanzada

    esultanzada Active Member

    Joined:
    May 8, 2013
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    there is no ip.dir and ip.pag file in /tmp/ip . how these thing create? what should i do?
     
  4. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    941
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    What are your ownership and permissions on /tmp ?

    The files should be directly in /tmp, just called /tmp/ip.dir and /tmp/ip.pag

    Also, make sure these are set in modsec2.user.conf or another modsec includes file:

    Code:
    SecUploadDir /tmp
    SecTmpDir /tmp
    SecDataDir /tmp
    SecRequestBodyAccess On
    
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Note that if you are not sure how to check permission values on the /tmp directory, you can use a command such as:

    Code:
    stat /tmp
    Thank you.
     
  6. esultanzada

    esultanzada Active Member

    Joined:
    May 8, 2013
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    here is the result of stat /tmp:

    also i added the following to modsec2.user.conf

    now what should i do?

    - - - Updated - - -

    Thank you Michael :)
     
  7. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    941
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    That all looks good. Are you continuing to get the error "collection_store: Failed to access DBM file "/tmp/ip"" after restarting apache?
     
  8. esultanzada

    esultanzada Active Member

    Joined:
    May 8, 2013
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Unfortunately yes :( its not fix.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  10. sonicthoughts

    sonicthoughts Well-Known Member

    Joined:
    Apr 4, 2011
    Messages:
    61
    Likes Received:
    3
    Trophy Points:
    8
    This is likely related to MUTEX locking and Modesc / GEOIP. Can really slow down the server.
     
Loading...

Share This Page