Reputation: 811
I wish to use the following command as a cron job:
/usr/sbin/logrotate /home/xxxx/public_html/cgi-bin/logrotate.conf -f
However the message is:
error: error creating state file /var/lib/logrotate.status: Permission
denied
Is there a way around this?
Upvotes: 3
Views: 953
Reputation: 3789
You can specify the output location of the status file:
/usr/sbin/logrotate -s /home/xxxx/logrotate/logrotate.status /home/xxxx/public_html/cgi-bin/logrotate.conf -f
Upvotes: 2
Reputation: 4786
Try run the cron
as sudoer:
sudo /usr/sbin/logrotate /home/xxxx/public_html/cgi-bin/logrotate.conf -f
Upvotes: 0