当前位置:网站首页>Cutting permission of logrotate file
Cutting permission of logrotate file
2022-04-23 18:14:00 【The hunter is eating meat】
1、 Problem description
logrotate When cutting files , Report errors
[email protected] 11:04:53:/usr# logrotate -d /etc/logrotate.d/rsyslog
Error message :
rotating pattern: /var/log/syslog
after 1 days (14 rotations)
olddir is archive, empty log files are not rotated, old logs are removed
considering log /var/log/syslog
error: skipping "/var/log/syslog" 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. rotating pattern: /var/log/kern.log /var/log/auth.log weekly (14 rotations) olddir is archive, empty log files are not rotated, old logs are removed considering log /var/log/kern.log error: skipping "/var/log/kern.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.
considering log /var/log/auth.log
error: skipping "/var/log/auth.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.
2、 analysis
The error messages are the same , Pick out a paragraph , as follows :
error: skipping “/var/log/syslog” 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.
The main reason is the problem of permission , You need to specify the user or group to execute the script .
Actually , The solution is also given :
Set “su” directive in config file to tell logrotate which user/group should be used for rotation.
3、 resolvent
stay logrotate The configuration of , Specify users and groups ,su root root.
logrotate The full configuration is as follows :
/var/log/syslog
{
su root root # Designated user 、 Group
daily
rotate 14
missingok
notifempty
# delaycompress
# compress
dateext
dateformat -%Y-%m-%d
olddir archive
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}
/var/log/kern.log
/var/log/auth.log
{
su root root # Designated user 、 Group
weekly
rotate 14
missingok
notifempty
# compress
# delaycompress
olddir archive
dateext
dateformat -%Y-%m-%d
sharedscripts
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}
版权声明
本文为[The hunter is eating meat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210611118454.html
边栏推荐
- ArcGIS table to excel exceeds the upper limit, conversion failed
- Reptile efficiency improvement method
- [UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (1)
- Robocode tutorial 3 - Robo machine analysis
- Flash - Middleware
- JD freefuck Jingdong HaoMao control panel background Command Execution Vulnerability
- 线上怎么确定期货账户安全的?
- re正則錶達式
- word frequency count
- Error reported when running tensorboard: valueerror: duplicate plugins for name projector, solution
猜你喜欢

Operators in C language

Matlab tips (6) comparison of seven filtering methods

idea中安装YapiUpload 插件将api接口上传到yapi文档上

Docker 安装 Redis

MATLAB小技巧(6)七种滤波方法比较

Data stream encryption and decryption of C

positioner

JD-FreeFuck 京东薅羊毛控制面板 后台命令执行漏洞

Dock installation redis

ArcGIS table to excel exceeds the upper limit, conversion failed
随机推荐
由tcl脚本生成板子对应的vivado工程
Selenium + phantom JS crack sliding verification 2
How to read literature
C byte array (byte []) and string are converted to each other
MySQL_ 01_ Simple data retrieval
Rust: shared variable in thread pool
Robocode tutorial 5 - enemy class
MySQL auto start settings start with systemctl start mysqld
JD freefuck Jingdong HaoMao control panel background Command Execution Vulnerability
Pyppeter crawler
Crawl the product data of cicada mother data platform
Quantexa CDI(场景决策智能)Syneo平台介绍
Nodejs installation
Vulnérabilité d'exécution de la commande de fond du panneau de commande JD - freefuck
Gobang game based on pyGame Library
Svn simple operation command
Arcpy adds fields and loop assignments to vector data
Resolves the interface method that allows annotation requests to be written in postman
Win1远程出现“这可能是由于credssp加密oracle修正”解决办法
串口调试工具cutecom和minicom