When trying to run freshclam manually, you get a warning about the system being unable to open /var/log/clamav/freshclam.log in append mode. It seems to be a relatively recent change as here is the listing from the /var/log/clamav/ directory: drwxr-xr-x 2 clamav clamav 4096 May 16 10:25 . drwxr-xr-x 14 root root 4096 May 12 03:10 .. -rw-r----- 1 root root 0 May 12 03:10 clamd.log -rw-r----- 1 clamav root 3703 Apr 21 03:09 clamd.log-20130421.gz -rw-r----- 1 clamav root 3849 Apr 28 03:05 clamd.log-20130428.gz -rw-r----- 1 clamav root 3748 May 5 03:01 clamd.log-20130505.gz -rw-r----- 1 root root 20 May 5 03:10 clamd.log-20130512.gz -rw-rw---- 1 root root 32 May 16 10:25 freshclam.log -rw-r----- 1 clamav root 2558 Apr 21 01:19 freshclam.log-20130421.gz -rw-r----- 1 clamav root 3041 Apr 28 01:15 freshclam.log-20130428.gz -rw-r----- 1 root root 2771 May 5 01:20 freshclam.log-20130505.gz -rw-r----- 1 root root 20 May 5 03:10 freshclam.log-20130512.gz tech8 ~ # Reproducible: Always Steps to Reproduce: 1. Have clamav installed for over 2 weeks with logrotate running. 2. Run freshclam 3. Actual Results: Error output: tech8 ~ # freshclam ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!). ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log). tech8 ~ # Expected Results: tech8 ~ # freshclam ClamAV update process started at Thu May 16 10:28:29 2013 WARNING: Your ClamAV installation is OUTDATED! WARNING: Local version: 0.97.7 Recommended version: 0.97.8 DON'T PANIC! Read http://www.clamav.net/support/faq main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven) WARNING: getfile: daily-17223.cdiff not found on remote server (IP: 64.22.33.90) WARNING: getpatch: Can't download daily-17223.cdiff from database.clamav.net Downloading daily-17223.cdiff [100%] daily.cld updated (version: 17223, sigs: 1272129, f-level: 63, builder: neo) bytecode.cld is up to date (version: 214, sigs: 41, f-level: 63, builder: neo) Database updated (2316557 signatures) from database.clamav.net (IP: 69.12.162.28) Well, knowing that logrotate is much more finicky about log ownerships now, I recommend updating the /etc/logrotate.d/clamav file to the following: /var/log/clamav/clamd.log { missingok su clamav root postrotate /etc/init.d/clamd logfix /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` 2>/dev/null || true endscript } /var/log/clamav/freshclam.log { missingok su clamav root postrotate /etc/init.d/clamd logfix /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> /dev/null` 2>/dev/null || true endscript }
I have the same problem. As a work-around I have set the write permission bits on /var/log/clamav/freshclam.log for both group users and other users; I recognize this is everything but a clean solution. Moreover, it doesn't work when freshclam is launched by a normal user because of a lack of permissions on the /var/lib/clamav directory (freshclam grants execution rights to both group users and other users too). (In reply to Linear Systems Tech Svcs. from comment #0) > When trying to run freshclam manually, you get a warning about the system > being unable to open /var/log/clamav/freshclam.log in append mode. > It seems to be a relatively recent change as here is the listing from the > /var/log/clamav/ directory: > drwxr-xr-x 2 clamav clamav 4096 May 16 10:25 . > drwxr-xr-x 14 root root 4096 May 12 03:10 .. > -rw-r----- 1 root root 0 May 12 03:10 clamd.log > -rw-r----- 1 clamav root 3703 Apr 21 03:09 clamd.log-20130421.gz > -rw-r----- 1 clamav root 3849 Apr 28 03:05 clamd.log-20130428.gz > -rw-r----- 1 clamav root 3748 May 5 03:01 clamd.log-20130505.gz > -rw-r----- 1 root root 20 May 5 03:10 clamd.log-20130512.gz > -rw-rw---- 1 root root 32 May 16 10:25 freshclam.log > -rw-r----- 1 clamav root 2558 Apr 21 01:19 freshclam.log-20130421.gz > -rw-r----- 1 clamav root 3041 Apr 28 01:15 freshclam.log-20130428.gz > -rw-r----- 1 root root 2771 May 5 01:20 freshclam.log-20130505.gz > -rw-r----- 1 root root 20 May 5 03:10 freshclam.log-20130512.gz > tech8 ~ # > > Reproducible: Always > > Steps to Reproduce: > 1. Have clamav installed for over 2 weeks with logrotate running. > 2. Run freshclam > 3. > Actual Results: > Error output: > tech8 ~ # freshclam > ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check > permissions!). > ERROR: Problem with internal logger (UpdateLogFile = > /var/log/clamav/freshclam.log). > tech8 ~ # > > Expected Results: > tech8 ~ # freshclam > ClamAV update process started at Thu May 16 10:28:29 2013 > WARNING: Your ClamAV installation is OUTDATED! > WARNING: Local version: 0.97.7 Recommended version: 0.97.8 > DON'T PANIC! Read http://www.clamav.net/support/faq > main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: > sven) > WARNING: getfile: daily-17223.cdiff not found on remote server (IP: > 64.22.33.90) > WARNING: getpatch: Can't download daily-17223.cdiff from database.clamav.net > Downloading daily-17223.cdiff [100%] > daily.cld updated (version: 17223, sigs: 1272129, f-level: 63, builder: neo) > bytecode.cld is up to date (version: 214, sigs: 41, f-level: 63, builder: > neo) > Database updated (2316557 signatures) from database.clamav.net (IP: > 69.12.162.28) > > > Well, knowing that logrotate is much more finicky about log ownerships now, > I recommend updating the /etc/logrotate.d/clamav file to the following: > > /var/log/clamav/clamd.log { > missingok > su clamav root > postrotate > /etc/init.d/clamd logfix > /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` > 2>/dev/null || true > endscript > } > > /var/log/clamav/freshclam.log { > missingok > su clamav root > postrotate > /etc/init.d/clamd logfix > /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> > /dev/null` 2>/dev/null || true > endscript > }
This is still very existent. Will there be a fix in portage?
Created attachment 356584 [details, diff] patch to fix buggy clamd.initd The issue happens because of buggy logfix function in /etc/init.d/clamd. It's already corrected in portage (clamd.initd-r5), but I think I make it a little better.
antivirus apparently has nothing to say. If this is indeed fixed in latest init script (-r6), let's stable and be done with it. Arches, please test and stabilize: =app-antivirus/clamav-0.98 Target arches: alpha amd64 hppa ia64 ppc ppc64 sparc x86
amd64 stable
Stable for HPPA.
x86 stable
ia64 stable
alpha stable
ppc stable
sparc stable
Appears like this has been been marked stable solely for HPPA: $ eshowkw clamav | grep 0.98 0.98 | ~ ~ ~ + ~ o o ~ ~ o o ~ ~ | o | gentoo
ppc64 stable
(In reply to Christian Tietz from comment #12) > Appears like this has been been marked stable solely for HPPA: > > $ eshowkw clamav | grep 0.98 > 0.98 | ~ ~ ~ + ~ o o ~ ~ o o ~ ~ | o | gentoo Thanks for pointing this out, keywords are restored as they should be set earlier. Closing this as fixed
*** Bug 480038 has been marked as a duplicate of this bug. ***