Hosting Articles Technical Articles

How To Sortout etc/cron.daily/logrotate for /tmp noexec workaround

How To Sortout etc/cron.daily/logrotate for /tmp noexec workaround


etc/cron.daily/logrotate for /tmp noexec workaround gives warning in ConfigServer Security&Firewall.

It is Giving the below Warning

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. See here for a way to do this


Log in to The server.

Go to the below path.

-nano /etc/cron.daily/logrotate

-File content should be like this after modification.

export TMPDIR=/var/spool/logrotate/tmp

/usr/sbin/logrotate /etc/logrotate.conf
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate “ALERT exited abnormally with [$EXITVALUE]”
exit 0

-Ctrls+x and save the file.

-Now Create a directory as follows.

mkdir -p /var/spool/logrotate/tmp

Tags:WHm,Capnel,Linux,Centos server,Firewall,CSF,Cpanel Firewall..

About the author


Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.