尝试使用logrotate,当我在logrotate.d中运行特定定义的日志循环脚本时,我收到以下错误
error: error creating state file /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
Run Code Online (Sandbox Code Playgroud)
我没有触及那条路,所以我想知道为什么它会默认创建一个错误...
Ray*_*yne 30
请勿 chmod将默认状态文件设置为666.如果你chmod这样,系统上的每个用户都可以logrotate用作攻击媒介.
只需为您的用户定义一个(私有)状态文件(假设您尝试以普通用户身份运行它)并带有选项[-s|--state file].
| 归档时间: |
|
| 查看次数: |
10488 次 |
| 最近记录: |