日志切割-注意问题
2025年5月31日小于 1 分钟
日志切割-注意问题
问题一:要在linux下创建配置文件
否则会因为文件权限问题报错
error: Ignoring 文件路径 because it is writable by group or others.
问题二:因为切割日志文件目录权限问题,需要在配置文件添加
su 用户 用户组
例如:
su root root
否则会报如下错误:
error: skipping "日志文件路径" 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.