Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Set permission on dmesg, wtmp log files

    Posted on

    As part the hardening process I set certain logs files to 600, all works fine for the usual suspects, cron, secure, kern.log etc.

    However when setting the dmesg log file to 600, after every reboot it gets set back to 644, I understand that this log gets re-created after every boot, so where can I set it permanently? Logrotate doesn't seem to fit this use case.

    I also have the same issue for wtmp, I did set this to 600 in logrotate, it was already configured at 644, so I changed, after reboot it backs at 644.

    /var/log/wtmp {
    monthly
    create 0600 root utmp
    minsize 1M
    rotate 1
    }

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat