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 | 阅读 578 次 | 评论(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条
游客请输入验证码
浏览1935090次
文章归档
最新评论
  • Miss_Zou:不都是复制粘贴的吗
  • Miss_Zou:目测是大佬
  • 神犇dengyuhy:语文很好