Translated message

A translation of this page exists in English.

logrotate が既存のログファイルのパーミッションを変更しない

Solution Verified - Updated -

Issue

  • /etc/logrotate.d/btmp を "create 0660 root utmp" から "create 0600 root utmp" に変更し、logrotate コマンドを実行した後、既存の /var/log/btmp* ファイルのパーミッションが変更されないというフィードバックがお客様から寄せられました。
# sudo  sh -c "ls -lt /var/log/btmp*" | cat -n
1 -rw-rw---- 1 root utmp 12288 Mar 18 09:18 /var/log/btmp
2 -rw-rw---- 1 root utmp 119 Feb 18 19:02 /var/log/btmp-20220301.gz
3 -rw-rw---- 1 root utmp 20 Jan 12 20:39 /var/log/btmp-20220201.gz

Environment

  • Red Hat Enterprise Linux
  • logrotate

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content