Directory /var/log/apache2/modsec_audit/<user>/YYYYMMDD... not being cleaned up

Operating System & Version
CentOS v7.9.2009
cPanel & WHM Version
cPanel & WHM v102.0.11 (STANDARD)

Mysticeti

Well-Known Member
Sep 16, 2002
59
7
158
Southern NH
The log files in this hierarchy are months and years old and apparently need to be cleaned up manually by an admin.

It would appear that the data in those folders count against end users' quota but they cannot access them to clean them up.

Is there a way to have the older files purged automatically?
 

Spirogg

Well-Known Member
Feb 21, 2018
700
160
43
chicago
cPanel Access Level
Root Administrator
The log files in this hierarchy are months and years old and apparently need to be cleaned up manually by an admin.

It would appear that the data in those folders count against end users' quota but they cannot access them to clean them up.

Is there a way to have the older files purged automatically?
I do not use mod sec so not sure if it shows up in logrotate



Files from /usr/local/cpanel/logs selected below will be rotated based upon their size. The rotated files will be compressed and stored in /usr/local/cpanel/logs/archive/. The files are named to include the month in which they are rotated. Consequently, the file names do not relate in any way to the content of the file being rotated. Files are only rotated when they grow larger than the Log Rotation Size Threshold setting or the default of 300MB. The archived log files are left in place indefinitely. Files not chosen here will not ever be rotated by cPanel software.

The archived log files are left in place indefinitely
The system stores the archived log files indefinitely, so you must remove them manually. Use the rm command to remove older log files.


Hope this helps
also

How to Clean Unmanaged Log Files
 
Last edited: