我希望使用以下命令作为cron作业:
/usr/sbin/logrotate /home/xxxx/public_html/cgi-bin/logrotate.conf -f然而,这条消息是:
error: error creating state file /var/lib/logrotate.status: Permission
denied有什么办法可以解决这个问题吗?
发布于 2016-01-12 23:35:08
您可以指定状态文件的输出位置:
/usr/sbin/logrotate -s /home/xxxx/logrotate/logrotate.status /home/xxxx/public_html/cgi-bin/logrotate.conf -f发布于 2016-01-12 23:34:04
尝试以sudoer身份运行cron:
sudo /usr/sbin/logrotate /home/xxxx/public_html/cgi-bin/logrotate.conf -f
https://stackoverflow.com/questions/34747643
复制相似问题