Verify Permissions on the system journal directories
An XCCDF Rule
Description
Verify the /run/log/journal and /var/log/journal directories have permissions set to "2750" or less permissive by using the following command:
$ sudo find /run/log/journal /var/log/journal -type d -exec stat -c "%n %a" {} \;If any output returned has a permission set greater than "2750", this is a finding.
Rationale
Any operating system providing too much information in error messages risks compromising the data and security of the structure, and content of error messages needs to be carefully considered by the organization.
- ID
- xccdf_org.ssgproject.content_rule_dir_permissions_system_journal
- Severity
- Medium
- References
- Updated
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- DISA-STIG-UBTU-22-232027
- configure_strategy
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if dpkg-query --show --showformat='${db:Status-Status}
' 'kernel' 2>/dev/null | grep -q installed; then
TMPFILES_CONF="/usr/lib/tmpfiles.d/systemd.conf"