Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the operating system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.
The structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.
Check
Verify the "/var/log/messages" file has a mode of "0640" or less permissive and is owned by the root user with the following command:
If the "/var/log/messages" file has a mode more permissive than "0640", this is a finding. If the "/var/log/messages" file is not owned by "root", this is a finding.
Verify the "/var/log" directory has a mode of "0755" or less permissive and is owned by the root user with the following command:
If the "/var/log/" directory has a mode more permissive than "0755", this is a finding. If the "/var/log/" directory is not owned by "root", this is a finding.
Fix
Change the permissions of the file "/var/log/messages" to "0640" and the ownership of the file to "root" by running the following commands: