Verify Group Who Owns /var/log Directory
An XCCDF Rule
Description
To properly set the group owner of /var/log
, run the command:
$ sudo chgrp syslog /var/log
Rationale
The /var/log
directory contains files with 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
- Severity
- Medium
- Updated
Remediation - Ansible
- name: Ensure group owner on /var/log/
file:
path: /var/log/
state: directory
group: '110'
tags:
Remediation - Shell Script
find -H /var/log/ -maxdepth 1 -type d -exec chgrp 110 {} \;