
With /tmp mounted noexec on red hat based distros, logrotate at the end of every week doesn't actually write to the blank log files it creates, instead it writes new entries to the archived .1 files.
Thanks again to Jonathan from way to the web.
To fix this error you need to:
mkdir /mytmp
Then edit /etc/cron.daily/logrotate and set the TMPDIR so it looks like this:
#!/bin/sh TMPDIR=/mytmp export TMPDIR /usr/sbin/logrotate /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0
Then run this to ensure its working ok:
/etc/cron.daily/logrotate
No comments have been posted for this article
HTML tags allowed in comments are: strong,em,ul,ol,li, URL's are automatically converted to links so no need to use <a>.