Overview

Note:

We introduced this feature in cPanel & WHM version 62.

cPanel & WHM provides the ModSecurity™ SDBM utility to purge expired entries from the /var/cpanel/secdatadir/ip.pag cache file. ModSecurity stores variables in this file, but does not automatically clean up the file when the variables expire. We provide this utility only as an RPM for EasyApache 4 systems.

Install the SDBM utility

To install the ModSecurity SDBM utility, run the following command:

yum install ea-modsec-sdbm-util

This RPM installs the /usr/sbin/modsec-sdbm-util binary.

Run the SDBM utility

The /scripts/maintenance script calls the SDBM utility if the utility exists on the system. We strongly recommend that you allow the maintenance script to run the utility.

Run the utility manually

Use the /scripts/shrink_modsec_ip_database script to run the SDBM utility. This script serves as a wrapper for the /usr/sbin/modsec-sdbm-util binary. This wrapper only functions when the utility exists on the system. To execute the script and purge expired entries from the /var/cpanel/secdatadir/ip.pag cache file, run the following command:

/scripts/shrink_modsec_ip_database -x

You can also run the following commands in a shell to purge the cache file:

cPanel, WebHost Manager, and WHM are registered trademarks of cPanel, Inc. for providing its computer software that facilitates the management and configuration of Internet web servers. ®2018 All rights reserved.