4.2.3 Ensure permissions on all logfiles are configured

Information

Log files contain information from many services on the the local system, or in the event of a centralized log server, others systems logs as well. In general log files are found in /var/log/ although application can be configured to store logs elsewhere. Should your application store logs in another, ensure to run the same test on that location.

It is important that log files have the correct permissions to ensure that sensitive data is protected and that only the appropriate users / groups have access to them.

Solution

Run the following command to set permissions on all existing log files in /var/log Although the command is not destructive, ensure that the output of the audit procedure is captured in the event that the remediation causes issues.

# find /var/log/ -type f -perm /g+wx,o+rwx -exec chmod --changes g-wx,o-rwx "{}" +

If there are services that logs to other locations, ensure that those log files have the appropriate permissions.

See Also

https://workbench.cisecurity.org/files/3742

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2, CSCv7|5.1

Plugin: Unix

Control ID: 34b3fb4b789ca63cbfb660f002001728ae2c0a27bdafe82c884705f4d59b67dc