logrotate 报错。Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

No Comments IT必备工具

分割日志时报错:error: skipping "/var/log/dnx/.access.log" 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.

解决

添加“su 用户 组”

 

到/etc/logrotate.d/dnx文件中即可

/datashare/log/fat/match/*.log
{
nocompress
daily
copytruncate
create
ifempty
su root root
}

发表评论