Barnoid’s Knowledge Base

Bits of Collected Wisdom

January 4th, 2007

Services stop logging after running logrotate

For services that log through syslog it won’t help to restart them after rotating their logs - as long as syslog is not restarted, nothing will be logged. If you don’t want to restart syslog several times while logrotate processes your configuration files in /etc/logrotate.d/, restart syslog after running logrotate in the cron script:

# /etc/cron.daily/logrotate.cron
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
/etc/init.d/syslog-ng reload > /dev/null 2>&1 || true

As far as I can tell, logrotate does not have a global ‘postrotate’ option, so adding the line to the cron script seems to be the only solution.

January 1st, 2007

du: fts_read failed: Permission denied

du dies with an

du: fts_read failed: Permission denied

error when it encounters a directory with no eXecute bit set on a ReiserFS partition.