[英]Logrotate cronjob not running
我希望使用以下命令作为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
尝试将cron
作为sudoer运行:
sudo /usr/sbin/logrotate /home/xxxx/public_html/cgi-bin/logrotate.conf -f
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.