Rule ID
SV-252466r958434_rule
Version
V1R9
CCIs
The audit service must be configured to create log files with the correct ownership to prevent normal users from reading audit logs. Audit logs contain sensitive data about the system and users. If log files are set to only be readable and writable by root or administrative users with sudo, the risk is mitigated.
To check the ownership of the audit log files, run the following command:
/usr/bin/sudo ls -le $(/usr/bin/sudo /usr/bin/grep '^dir' /etc/security/audit_control | awk -F: '{print $2}') | grep -v current
The results should show the owner (third column) to be "root".
If they do not, this is a finding.For any log file that returns an incorrect owner, run the following command: /usr/bin/sudo chown root [audit log file] [audit log file] is the full path to the log file in question.