2

I'm running a server and I have a rsyslog logrotate config file that doesn't seem to run using cron job. It will only work if i run it manually

Troubleshooting steps i took:

logrotate -df /etc/logrotate.conf

Result: Able to log rotate successfully

run-parts /etc/cron.daily

Result: Able to log rotate successfully (Verify by looking at timestamp of cron log in /var/log/cron)

Jun  6 15:42:19 server run-parts(/etc/cron.daily)[144143]: starting logrotate
Jun  6 15:49:26 server run-parts(/etc/cron.daily)[146078]: finished logrotate

However, the problem is if i let it run normally by itself it does not seem to rotate.This is the log of the cron job that ran:

Jun  6 03:19:01 server run-parts(/etc/cron.daily)[43048]: starting logrotate
Jun  6 03:19:01 server run-parts(/etc/cron.daily)[43069]: finished logrotate

The permission for logrotate in /etc/cron.daily/ is already 755

Regarding SELINUX permissioning of the log files in question, have already set them correctly using

chcon --reference /var/log /directory/files

Any ideas?

stiffy
  • 23
  • 3

0 Answers0