logrotate/logwatch error on fc15

Alex mysqlstudent at gmail.com
Sun Oct 21 21:59:34 UTC 2012


Hi,

I have an fc15 box and I'm having a problem with logwatch. I'm using
bzip2 for the compresscmd for logrotate, yet it somehow is giving the
compressed files a gz instead of bz2 extension. Logwatch uses this to
determine which command to use to read the compressed files, so it
therefore is using the wrong command.

However, the files seem to be begin rotated. I hoped someone could
help clarify what's going on. I have the following in
/etc/logrotate.conf:

# uncomment this if you want your log files compressed
compresscmd /usr/bin/bzip2
compress

Here's a list of the freshclam files that are being compressed and rotated:

# ls -l /var/log/clamav/freshclam.log*
-rw-rw---- 1 clamupdate amavis 6775 Oct 21 17:47 /var/log/clamav/freshclam.log
-rw-rw---- 1 clamupdate amavis  939 Oct 11 23:47
/var/log/clamav/freshclam.log-20121012.gz
-rw-rw---- 1 clamupdate amavis  916 Oct 12 23:46
/var/log/clamav/freshclam.log-20121013.gz
-rw-rw---- 1 clamupdate amavis  855 Oct 13 23:46
/var/log/clamav/freshclam.log-20121014.gz

Running 'file' on the compressed files says they are bzip2 files.
Here's the contents of the error message I receive from logwatch in an
email every day from cron.daily:

/etc/cron.daily/0logwatch:
gzip: /var/log/clamav/freshclam.log-20121019.gz: not in gzip format
system 'zcat '/var/log/clamav/freshclam.log-20121019.gz' >>
/var/cache/logwatch/logwatch.zOSnHbtE/clam-update-archive' failed: 256
at /etc/cron.daily/0logwatch line 764.

Why are the files being compressed and named with the wrong extension?

Thanks,
Alex


More information about the users mailing list