anacron daily error logrotate

leonep

Well-Known Member
Nov 18, 2014
163
8
68
Pescara
cPanel Access Level
Root Administrator
hi ,
1 of my boxes sometime shows error on cron daily
i have no idea what is

/etc/cron.daily/logrotate:

error: modsecurity_logs:1 duplicate log entry for /usr/local/apache/logs/modsec_audit.log
error: found error in file modsecurity_logs, skipping

you think this need more investigation?
 
Last edited:

andrew.n

Well-Known Member
Jun 9, 2020
519
138
43
EU
cPanel Access Level
Root Administrator
What is the first line in the file of /usr/local/apache/logs/modsec_audit.log?
 

andrew.n

Well-Known Member
Jun 9, 2020
519
138
43
EU
cPanel Access Level
Root Administrator
my bad sorry...what is the content of "modsecurity_logs" file?
 

leonep

Well-Known Member
Nov 18, 2014
163
8
68
Pescara
cPanel Access Level
Root Administrator
thanks for help . here is it

/usr/local/apache/logs/modsec_audit.log {
rotate 15
size=300M
missingok
compress
postrotate
/usr/local/cpanel/scripts/restartsrv_httpd &> /dev/null || true
/usr/local/cpanel/scripts/restartsrv_tailwatchd &> /dev/null || true
endscript
}
 

andrew.n

Well-Known Member
Jun 9, 2020
519
138
43
EU
cPanel Access Level
Root Administrator
Can you remove "/usr/local/apache/logs/modsec_audit.log" from that file and leave only this?

{
rotate 15
size=300M
missingok
compress
postrotate
/usr/local/cpanel/scripts/restartsrv_httpd &> /dev/null || true
/usr/local/cpanel/scripts/restartsrv_tailwatchd &> /dev/null || true
endscript
}