I'm using the clamd initscript to only start freshclam. It includes the logfix() function which should fix the owner/perms on the logfile /var/log/clamav/freshclam.log. It doesn't do anything for me though. The file stays root:root (because the supplied logrotate script does it this way). I traced the problem to this if-statement: if [ -n "${logfile}" -a -n "${clamav_user}" ]; then the init script doesn't descend into the statement, even though $logfile and $clamav_user are set and non-empty. Simply commenting it out makes the whole thing work for me. Alternatively to the logfix() function, one could also modify the logrotate script to create files already owned by $clamav_user.
I forgot the reason: The if-statement needs to check for $freshclam_user and not $clamav_user
app-antivirus/clamav-0.96 is stable now
Same bug in 0.96
Created attachment 228243 [details, diff] Patch for init script Uhm, hello? Any dev there? This is a 10-second fix :) Here's a patch so you don't even have to think :)
Should be fixed in clamav-0.97.5-r1.