我希望使用以下命令作为 cron 作业:
/usr/sbin/logrotate /home/xxxx/public_html/cgi-bin/logrotate.conf -f
但是消息是:
error: error creating state file /var/lib/logrotate.status: Permission
denied
有解决办法吗?
最佳答案
可以指定状态文件的输出位置:
/usr/sbin/logrotate -s /home/xxxx/logrotate/logrotate.status /home/xxxx/public_html/cgi-bin/logrotate.conf -f
关于linux - Logrotate cronjob 未运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34747643/