Reputation: 502
I am trying to use logrotate to rotate my log files. However, we don't want to do that as root. However, if I execute it with some other job account it fails as its not able to edit or create file /var/lib/logrotate.status. Is there a way to configure log rotate to use a different status file.
Upvotes: 4
Views: 4179
Reputation: 86
Have you tried to use "-s" parameter? From manual:
-s, --state <statefile>
Tells logrotate to use an alternate state file. This is useful
if logrotate is being run as a different user for various sets
of log files. The default state file is /var/lib/logrotate/sta-
tus.
Upvotes: 6