Summary: | app-antivirus/clamav with logrotate = broken perm for log files | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergiy Borodych <Sergiy.Borodych> |
Component: | New packages | Assignee: | Antivirus Team <antivirus> |
Status: | VERIFIED TEST-REQUEST | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Sergiy Borodych
2007-03-13 14:44:15 UTC
You're right. In the past, the initscript changed owner of both log files to user clamav (hardcoded). Then the code was removed. I guess I never thought of that because I never hit the bug you describe. Anyway, the initscript now changes ownership of both logs to correct user (parsed from config files). Thanks for suggestion! I also suggest in logrotate file change postrotate /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` 2>/dev/null || true to postrotate /etc/init.d/clamd restart 2>/dev/null || true because before it create 640 clamav clamav and log files create under clamav clamav or remove this string anywhere I think - I must reopen bug for pay attention my previous comment problem still exists unless fix logrotate file Ok, I moved permission/ownership fix to a separate logfix() function in the initscript, which is called from start(), as well as from the logrotate script. How does that sound? permission now ok but you not reload clamav :( so clamd use old open pipe lsof show clamd 16701 qscand 3w REG 8,3 30511 267443 /var/log/clamav/clamd.log.1 (deleted) please change (in clamav.logrotate) /etc/init.d/clamd logfix to /etc/init.d/clamd restart A better idea is to reload clamd/freshclam using SIGHUP, just like before. This time, however it is after permissions are fixed, so all should be peachy. Changes committed. now all ok thanks |