logrotate执行切割的时候出现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错误的解决办法

作者在 2019-06-03 17:46:14 发布以下内容

vi /etc/logrotate.d/down.bccn.net


/var/sitepath/log/host.access.log{
    su root list
    missingok
    notifempty
    compress
    olddir /var/sitepath/log/access/
    daily
    copytruncate
    rotate 30
}

/var/sitepath/log/error.log{
    su root list
    missingok
    notifempty
    compress
    olddir /var/sitepath/log/error/
    daily
    copytruncate
    rotate 30
}
作者在 2025-12-25 21:34:04 补充以下内容
真正完美的解决办法是修改父目录的权限
chmod 755 /var/sitepath/log

Linux | 阅读 5763 次
文章评论,共0条
游客请输入验证码
浏览3034760次
文章归档
最新评论
  • 静夜思:-1是多核
  • 时光拾荒者:CtrlCV还是强的?