RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 740346 - boot.log being created with 644 when umask is set to 077
Summary: boot.log being created with 644 when umask is set to 077
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rsyslog
Version: 6.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Tomas Heinrich
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-21 17:39 UTC by Richard Diekema
Modified: 2011-12-12 12:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-12 12:37:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Richard Diekema 2011-09-21 17:39:40 UTC
As part of applying the CIS baseline hardening standards, boot.log should not be world readable. When setting the umask to 077 with the following commands:

sed -i '1i umask 077' /etc/bashrc
sed -i '1i umask 077' /etc/csh.cshrc
sed -i '1i umask 077' /etc/skel/.bashrc
sed -i '1i umask 077' /root/.bashrc
sed -i '1i umask 077' /root/.cshrc
sed -i '1i umask 077' /root/.tcshrc
sed -i '1i umask 077' /etc/profile
sed -i '1i umask 077' /etc/csh.login
sed -i '1i umask 077' /root/.bash_profile

boot.log is still created on boot with 644 permissions set.

To Reproduce:

Set umask to 077 with the following commands:

sed -i '1i umask 077' /etc/bashrc
sed -i '1i umask 077' /etc/csh.cshrc
sed -i '1i umask 077' /etc/skel/.bashrc
sed -i '1i umask 077' /root/.bashrc
sed -i '1i umask 077' /root/.cshrc
sed -i '1i umask 077' /root/.tcshrc
sed -i '1i umask 077' /etc/profile
sed -i '1i umask 077' /etc/csh.login
sed -i '1i umask 077' /root/.bash_profile

boot.log created with 644 permissions.

Comment 2 RHEL Program Management 2011-09-21 18:08:03 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Jan Kaluža 2011-09-27 08:23:13 UTC
logrotate is executed by cron which does not read profile from any file. If you want logrotate to create log files with specific permission, you have to use "create" directive in /etc/logrotate.d/syslog config file. Check "man logrotate" for more info.

> boot.log is still created on boot with 644 permissions set.

I think this is not logrotate's problem, because it does not create that file on boot, it just rotates it when it's big/old enough according to config file.

I will reassign this bug to rsyslog owner.

Comment 4 Tomas Heinrich 2011-10-05 08:55:40 UTC
You may want to try the $FileCreateMode and$umask configuration directives.
http://www.rsyslog.com/doc/rsconf1_filecreatemode.html

Comment 5 Tomas Heinrich 2011-12-12 12:37:32 UTC
This looks like a configuration issue, closing as not-a-bug. Feel free to reopen.


Note You need to log in before you can comment on or make changes to this bug.