On Mon, 02 Feb 2004 at 14:53:10 +0100, Daniel Wiberg wrote: > On Mon, Feb 02, 2004 at 02:27:18PM +0100, Tomasz Papszun wrote: > > I didn't look at the sources but I've always thought that log rotating > > is done different way. > > The current logfile is _moved_ to other filename, not removed (deleted). > > Due to this, the logfile is still open and new entries can be written to > > it. Then on reload or restart, the handle (file descriptor?) is released > > and the new logfile is created. Not earlier! > > > > I don't know if it makes any difference for clamd, though. > > Just a thought, user clamav does not have write permissions in the log > directory, so logrotate, which I guess runs as root should create the new > files also, owned by user clamav. > > Or did I overlook something? >
Daniel is right. I forgot to write the most important thing :-) : clamd works with logrotate correctly at my place. The previous logfile ends with: Sun Feb 1 06:28:36 2004 -> Socket file removed. Sun Feb 1 06:28:36 2004 -> Pid file removed. Sun Feb 1 06:28:36 2004 -> --- Stopped at Sun Feb 1 06:28:36 2004 And the current one begins with: Sun Feb 1 06:28:36 2004 -> +++ Started at Sun Feb 1 06:28:36 2004 Sun Feb 1 06:28:36 2004 -> Log file size limit disabled. Sun Feb 1 06:28:36 2004 -> Reading databases from /var/lib/clamav/ ... This is ClamAV version 0.65-BugFixesFromCVS-20031123 on Debian Woody. My clamav-daemon entry is: /var/log/clamd.log { weekly missingok notifempty compress postrotate /etc/init.d/clamav-daemon force-reload endscript } But I have also "create" option in logrotate.conf so a new logfile is created with the same attributes as an old one (amavis.amavis). -- Tomasz Papszun SysAdm @ TP S.A. Lodz, Poland | And it's only [EMAIL PROTECTED] http://www.lodz.tpsa.pl/ | ones and zeros. [EMAIL PROTECTED] http://www.ClamAV.net/ A GPL virus scanner ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users