天天看点

error: skipping because parent directory has insecure permissions问题

问题描述

logrotate执行轮询异常,“considering log /var/log/xxxlog

error: skipping “/var/log/xxxlog” because parent directory has insecure permissions (It’s world writable or writable by group which is not “root”) Set “su” directive in config file to tell logrotate which user/group should be used for rotation.”

原因

一番试错发现对应日志文件(xxxlog)的父文件夹有“w”的组权限。

暂时没能google到为什么组权限有“w”就不安全。

解决方法

方法一:去掉对应日志父目录的“w”组权限 ---- g-w

方法二:在对应的logrotate配置文件中添加“su <dir_user> <dir_group>”

继续阅读