Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 174512

Summary: clamav init script chowns freshclam.log to wrong user
Product: Gentoo Linux Reporter: Jeremy Huddleston (RETIRED) <eradicator>
Component: Current packagesAssignee: Antivirus Team <antivirus>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: clamav.rc.patch

Description Jeremy Huddleston (RETIRED) gentoo-dev 2007-04-13 20:24:41 UTC
The init script was recently updated to chown the log files on startup.  It incorrectly chowns the freshclam.log file to the user running clamd, not the user running freshclam:

I have user clamav run freshclamd and user amavis run clamd.

 * Caching service dependencies ...                                                                                                                                                                                                                                                                            [ ok ]
 * Stopping clamd ...                                                                                                                                                                                                                                                                                          [ ok ]
 * Stopping freshclam ...                                                                                                                                                                                                                                                                                      [ ok ]
 * Starting clamd ...
Running as user amavis (UID 109, GID 1018)                                                                                                                                                                                                                                                                     [ ok ]
 * Starting 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).
 * Failed to start freshclam                                                                                                                                                                                                                                                                                   [ !! ]
Comment 1 Jeremy Huddleston (RETIRED) gentoo-dev 2007-04-13 20:25:05 UTC
Created attachment 116188 [details, diff]
clamav.rc.patch

Here's the fix.
Comment 2 Andrej Kacian (RETIRED) gentoo-dev 2007-04-13 20:57:28 UTC
Ah, right - look like I missed that and just assumed the same user as for clamd. Applied, thanks!