Introduction
There are secdatadir DBM file errors seen in the Apache error log:
[Wed Aug 19 15:35:40.205810 2020] [:error] [pid 2532] [client 192.168.100.110:50312] [client 0.0.0.0] ModSecurity: collections_remove_stale: Failed to access DBM file "/var/cpanel/secdatadir/username-global": Permission denied [hostname "www.domain.tld"] [uri "/.well-known/pki-validation/5246234dDF4fg.txt"] [unique_id "fgdfgdfhSgsgSg"]
Procedure
You can fix this by switching from mod_ruid2 to mod_suexec. Mod_ruid2 is not compatible with mod_security, but mod_suexec is. Steps to switch to mod_suexec:
- Log into WHM and navigate to EasyApache 4 - "Home » Software » EasyApache 4"
- In the "Currently Installed Packages" box, click "Customize"
- Navigate to "Apache Modules" and tick "mod_ruid2" off.
- Search for "mod_suexec" and enable it.
- Click "Review" on the left-hand side.
- Scroll down and click "Provision"
Please note, that operating systems that use APT have its packages as dashes rather than underscores. Due to this, the packages would look like mod-ruid2 instead of mod_ruid2.