:error: skipping "/var/log/nginx/test.access.log" because parentdirectory has insecure permissions (It's world writable or writable bygroup which is not "root") Set "su" directive in config file to telllogrotate which user/group should be used for rotation.
复制代码
xx 文件所属用户
添加“su root xx”到/etc/logrotate.d/nginx文件中即可
如下: