View Single Post
  #12  
Old 10th November 2007, 19:46
satommy satommy is offline
Junior Member
 
Join Date: Oct 2007
Posts: 9
Thanks: 0
Thanked 3 Times in 2 Posts
Default

OK,

This is how I think it could work:

We create two new files in /etc/logrotate.d/ :

-mail
-messages

These files:

------------------------------------------------------------------
mail:

/var/log/mail.log {
rotate 30
daily
compress
delaycompress
create 644 root adm
}

messages:

/var/log/messages {
rotate 30
daily
compress
delaycompress
create 644 root adm
}

-----------------------------------------------------------

Ok, the rotate setting means how many files he has to keep, 30 files, en daily rotated, so he will keep up for a month.

Further on I took the clamav logrotate files and edit the rights.:

---------------------------------------------------------

clamav-daemon:

/var/log/clamav/clamav.log {
rotate 12
weekly
compress
delaycompress
create 644 clamav adm
postrotate
/etc/init.d/clamav-daemon reload-log > /dev/null
endscript
}

clamav-freshclam:

/var/log/clamav/freshclam.log {
rotate 12
weekly
compress
delaycompress
create 644 clamav adm
postrotate
/etc/init.d/clamav-freshclam reload-log > /dev/null
endscript
}

-----------------------------------------------------

We could just let these files be replaced by the installer.

For chmodding the first log files, so before the logrotate run the first time:

chmod 644 /var/log/mail.log
chmod 644 /var/log/messages
chmod 644 /var/log/clamav/*.log


After these additions I can succesfully read all the log files in the webconfig :-)
Reply With Quote