打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
logrotate 文件切割 权限问题

From root@master.localdomain Fri Sep 28 06:36:02 2018
Return-Path: <root@master.localdomain>
X-Original-To: root
Delivered-To: root@master.localdomain
Received: by master.localdomain (Postfix, from userid 0)
id CD5FFC070DD4; Fri, 28 Sep 2018 06:36:02 -0400 (EDT)
From: Anacron <root@master.localdomain>
To: root@master.localdomain
Content-Type: text/plain; charset="UTF-8"
Subject: Anacron job ''cron.daily'' on master
Message-Id: <20180928103602.CD5FFC070DD4@master.localdomain>
Date: Fri, 28 Sep 2018 06:36:02 -0400 (EDT)

/etc/cron.daily/logrotate:

error: skipping "/var/log/salt/master" 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.
error: skipping "/var/log/salt/minion" 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.
error: skipping "/var/log/salt/key" 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 root list

vim /etc/logrotate.d/salt

/var/log/salt/master {
su root root
weekly
missingok
rotate 7
compress
notifempty
}

/var/log/salt/minion {
su root root
weekly
missingok
rotate 7
compress
notifempty
}

/var/log/salt/key {
su root root
weekly
missingok
rotate 7
compress
notifempty
}

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Linux操作系统上SSH无法启动
CentOS5.3安装Oracle11g(图文)(三) |Linux视野
git学习笔记
Linux系统日志管理
linux RPM 安裝,升級,查詢
第十五章 日志管理
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服