本文介绍了错误:错误创建状态文件/var/lib/logrotate/status:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用 logrotate,当我为 logrotate.d 中的特定定义运行日志轮换脚本时出现以下错误

Trying to use logrotate and I get the following error when I run the log rotate script for a particular definition in logrotate.d

error: error 创建状态文件/var/lib/logrotate/status: Permission denied

/var/lib/logrotate$ ls -lah
total 12K
drwxr-xr-x  2 root root 4.0K 2012-05-11 06:25 .
drwxr-xr-x 43 root root 4.0K 2012-05-18 08:07 ..
-rw-r--r--  1 root root  911 2012-05-25 06:25 status

我没有接触过那个路径,所以我想知道为什么它会默认创建一个错误...

I haven't touched that path, so I wonder why it would create an error by default...

推荐答案

您确定以 root 身份运行此命令吗...?;)如果是这样,请检查系统上是否有 AppArmour - 如果是,请检查其配置或卸载它(Ubuntu 案例).

Are you sure you run this command as root...? ;)If so please check if there is an AppArmour on the system - if yes check it's configuration or uninstall it (Ubuntu case).

这篇关于错误:错误创建状态文件/var/lib/logrotate/status:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 12:47