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错误的解决办法

Linux | 2019-06-03 17:46:14 | 阅读 106 次 | 评论(0)

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
}
文章评论,共0条
游客请输入验证码
浏览1832256次
文章归档
最新评论
  • 静夜思:9年了,当年解决这个问题的思路记忆犹新😊
  • FQYB:汇编是纯文字的吧~
  • 敏敏张11:厉害的