Verify Group Who Owns /var/log/messages File
An XCCDF Rule
Description
To properly set the group owner of /var/log/messages
, run the command:
$ sudo chgrp root /var/log/messages
Rationale
The /var/log/messages
file contains logs of error messages in
the system and should only be accessed by authorized personnel.
- ID
- xccdf_org.ssgproject.content_rule_file_groupowner_var_log_messages
- Severity
- Medium
- Updated
Remediation - Ansible
- name: Test for existence /var/log/messages
stat:
path: /var/log/messages
register: file_exists
tags:
- DISA-STIG-RHEL-08-010230
Remediation - Shell Script
chgrp 0 /var/log/messages