天天看點

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>”

繼續閱讀