야생토끼 블로그

centos 6.4 logrotate 이슈 해결 본문

Computer science/linux

centos 6.4 logrotate 이슈 해결

lazy. 2020. 4. 7. 17:10

centos 6.4 버전 logrotate 사용 중 아래와 같은 에러가 났다.

1 lines must begin with a keyword or a filename (possibly in double quotes)
2 unknown option 'su' -- ignoring line

 

 

 

1. lines must begin with a keyword or a filename (possibly in double quotes)

- window형식의 config 파일을 리눅스 서버에 업로드하여 생긴 문제였고, notePad에서 unix형식으로 저장하거나, linux에서 줄 바꿈 자리를 다 지운 후 다시 줄 바꿈 처리 후 정상 동작했다.

참고 자료 캡처

 

 

 


2 unknown option 'su' -- ignoring line

- 'su' 옵션은 CentOs 6보다 최신버전 7 이상부터 동작하는 옵션이라고 한다. 6에서는 제거해야 한다.

 

참고자료 : https://stackoverflow.com/questions/22267563/logrorate-error-lines-must-begin-with-a-keyword-or-a-filename-possibly-in-dou

 

logrorate: error: lines must begin with a keyword or a filename (possibly in double quotes)

I have the following logrorate config for my iptables: /var/log/iptables.log { daily missingok rotate 3 compress notifempty delaycompress

stackoverflow.com

https://forums.centos.org/viewtopic.php?t=58276

 

Centos 6.8 logrotate - CentOS

General support questions BrianMc Posts: 3 Joined: 2016/06/22 19:53:58 Post by BrianMc » 2016/06/22 20:08:24 Hello All - New CentOS x86_64 6.8 vm has logrotate-3.7.8-26.el6_7.x86_64 and getting the following error: /etc/cron.daily/logrotate: error: nailswe

forums.centos.org

https://github.com/sni/Thruk/issues/471

 

Missing "su" directive in /etc/logrotate.d/thruk for distributions using logrotate 3.8.0+ · Issue #471 · sni/Thruk

In CentOS 7 and other distros using logrotate 3.8.0+ the "su" directive is now required, from the changelog: "added "su" option to define user/group for rotation. Logrotate...

github.com

 

Comments