rsyslog.service를 다시 시작한 후에도 /var/log/secure 및 기타 로그 파일은 비어 있습니다.

rsyslog.service를 다시 시작한 후에도 /var/log/secure 및 기타 로그 파일은 비어 있습니다.

Centos7로깅을 위한 서버 를 운영하고 있습니다 rsyslog. 서비스가 시작되었습니다( sudo systemctl is-enabled rsyslog) "활성화됨"이 출력됩니다. 또한 부팅 시 서비스가 시작되도록 구성했습니다.

그러나 /var/log/secure의도적으로 SSH 로그인을 실패시키려는 시도에도 불구하고 파일은 비어 있는 상태로 유지됩니다. 다른 로그 파일(메일러, 스풀, 메시지를 제외한 cron)도 비어 있습니다.

내가 어디서 잘못됐나요? 어떤 도움이라도 환영합니다.

고쳐 쓰다:
출력 ls -ld /var/log:
drwxr-xr-x. 11 root root 4096 Mar 4 11:06 /var/log

출력 ls -l /var/log:
drwxr-xr-x. 2 root root 6 Oct 7 17:53 anaconda drwxr-x---. 2 root root 94 Mar 4 13:39 audit -rw-r--r--. 1 root root 549 Nov 30 16:33 boot.log -rw-------. 1 root utmp 0 Mar 1 03:13 btmp -rw-------. 1 root utmp 1920 Feb 11 15:25 btmp-20160301 drwxr-xr-x. 2 chrony chrony 6 Nov 24 03:05 chrony -rw-r--r--. 1 root root 14056 Nov 30 16:33 cloud-init.log -rw-r--r--. 1 root root 34623 Mar 4 10:19 cloud-init-output.log -rw-r--r--. 1 root root 0 Feb 28 03:40 cron -rw-r--r--. 1 root root 0 Feb 1 03:09 cron-20160207 -rw-r--r--. 1 root root 0 Feb 7 03:09 cron-20160214 -rw-r--r--. 1 root root 8948 Feb 18 21:01 cron-20160223 -rw-r--r--. 1 root root 0 Feb 23 12:41 cron-20160228 -rw-r--r--. 1 root root 35746 Mar 4 10:19 dmesg -rw-r--r--. 1 root root 35859 Mar 3 11:48 dmesg.old -rw-------. 1 root root 1948 Dec 29 12:08 grubby drwx------. 2 root root 4096 Mar 1 20:14 httpd -rw-r--r--. 1 root root 292876 Mar 4 15:59 lastlog -rw-------. 1 root root 0 Feb 28 03:40 maillog -rw-------. 1 root root 0 Feb 1 03:09 maillog-20160207 -rw-------. 1 root root 0 Feb 7 03:09 maillog-20160214 -rw-------. 1 root root 3583 Feb 18 19:07 maillog-20160223 -rw-------. 1 root root 0 Feb 23 12:41 maillog-20160228 -rw-------. 1 root root 120630 Mar 4 10:49 messages -rw-------. 1 root root 0 Feb 1 03:09 messages-20160207 -rw-------. 1 root root 0 Feb 7 03:09 messages-20160214 -rw-------. 1 root root 42189 Feb 18 21:03 messages-20160223 -rw-------. 1 root root 0 Feb 23 12:41 messages-20160228 drwxr-xr-x. 2 ntp ntp 6 Jan 25 19:57 ntpstats drwx------. 2 root root 6 Jun 10 2014 ppp drwxrwxrwx. 3 root root 25 Nov 30 16:55 rsyslog_custom -rw-------. 1 root root 0 Feb 28 03:40 secure -rw-------. 1 root root 0 Feb 1 03:09 secure-20160207 -rw-------. 1 root root 0 Feb 7 03:09 secure-20160214 -rw-------. 1 root root 17991 Feb 18 20:20 secure-20160223 -rw-------. 1 root root 0 Feb 23 12:41 secure-20160228 -rw-------. 1 root root 0 Feb 28 03:40 spooler -rw-------. 1 root root 0 Feb 1 03:09 spooler-20160207 -rw-------. 1 root root 0 Feb 7 03:09 spooler-20160214 -rw-------. 1 root root 0 Feb 14 03:34 spooler-20160223 -rw-------. 1 root root 0 Feb 23 12:41 spooler-20160228 -rw-------. 1 root root 0 Oct 7 17:43 tallylog drwxr-xr-x. 2 root root 22 Dec 9 18:55 tuned -rw-rw-r--. 1 root utmp 241152 Mar 4 15:59 wtmp -rw-------. 1 root root 1926 Mar 4 13:20 yum.log -rw-------. 1 root root 13145 Dec 29 16:02 yum.log-20160101

답변1

구성에 /var/log/messages다음 줄이 포함되어 있는 경우:

*.info;mail.none;authpriv.none;cron.none /var/log/messages 

제거하다 *:

.info;mail.none;authpriv.none;cron.none /var/log/messages

그런 다음 rsyslogd( systemctl restart rsyslog)을 다시 시작하십시오. 이유는 모르겠지만 같은 문제가 있었고 효과가있었습니다.

관련 정보