PDA

View Full Version : error: error renaming temp state file /var/lib/logrotate.status.tmp



Fli
08-10-2016, 10:08 AM
Sender: Cron Daemon

E-mail subject: Cron <root@vps> [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily

Body:

etc/cron.daily/logrotate:

error: error renaming temp state file /var/lib/logrotate.status.tmp

How to fix this? I tried:

vi /etc/cron.daily/logrotate

comment out (add # at the beginning of the line)

/usr/sbin/logrotate /etc/logrotate.conf

and add this line above commented out line:

/usr/sbin/logrotate -s /var/spool/logrotate.status /etc/logrotate.conf

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

Or editting correct file in /etc/cron.d/
adding 2> /dev/null at the end???

02 4 * * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.daily 2> /dev/null
22 4 * * 0 root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.weekly 2> /dev/null
42 4 1 * * root [ ! -f /etc/cron.hourly/0anacron ] && run-parts /etc/cron.monthly 2> /dev/null