Information
RSyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.
It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.
Solution
Edit either /etc/rsyslog.conf or a dedicatedconf file in /etc/rsyslog.d/ and set $FileCreateMode to 0640 or more restrictive:
$FileCreateMode 0640
Restart the service:
# systemctl restart rsyslog
Impact:
The systems global umask could override, but only making the file permissions stricter, what is configured in RSyslog with the FileCreateMode directive. RSyslog also has its own $umask directive that can alter the intended file creation mode. In addition, consideration should be given to how FileCreateMode is used.
Thus it is critical to ensure that the intended file creation mode is not overridden with less restrictive settings in /etc/rsyslog.conf /etc/rsyslog.d/*conf files and that FileCreateMode is set before any file is created.
Item Details
Category: ACCESS CONTROL, AUDIT AND ACCOUNTABILITY, MEDIA PROTECTION
References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|AU-2, 800-53|AU-7, 800-53|AU-12, 800-53|MP-2, CSCv7|5.1, CSCv7|6.2, CSCv7|6.3
Control ID: 884c66579a91d1f91a462a58d70fdcff6ebad4d112a949891769595f69c057b9