ConfigServer.Com Technical FAQ
| Why are my log files not rotating correctly? Why is syslog writing to an older log file? Why is lfd not picking up login failures? (cPanel Server Management) |
| Due to a bug in logrotate if /tmp is mounted with the noexec option, you need to have logrotate use a different temporary directory. If you don't do this syslog may not restart correctly and will write to the wrong (older) log files.
You can do this by editing /etc/cron.daily/logrotate so that it looks like this:
#!/bin/sh
export TMPDIR=/var/spool/logrotate/tmp
/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 create the directory:
mkdir -p /var/spool/logrotate/tmp |
| FAQ Home | Search FAQs | Contact Us |
| Go to Helpdesk | ||
