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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章