Jim Maul wrote:
> Matt Fretwell wrote:
>>  Just to test, as an ordinary user, run:
>> 
>> touch /var/log/test.log
>> 
>>  Now why does it create the logfile as root?
>> 
> 
> While i get your point, it is irrelevant because it should not log in
> /var/log/ directly.  It should log in /var/log/clamav/
> 
> -Jim

Hopefully this will help someone.  I got it off the list earlier (sorry, don't 
remember who sent it to me originally:)

$ cat /etc/logrotate.d/clamav
/var/log/clamav/clamd.log {
        missingok
        nocompress
        create 640 clamav defang
        postrotate
                /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` 2> 
/dev/null || true
        endscript
}

/var/log/clamav/freshclam.log {
        missingok
        nocompress
        create 640 clamav defang
        postrotate
                /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> /dev/null` 
2> /dev/null || true
        endscript
}

I use defang as a generic "mail administration" group, which is why that group 
gets read access.

-- 
Matthew.van.Eerde (at) hbinc.com                 805.964.4554 x902
Hispanic Business Inc./HireDiversity.com         Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg," 
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to