Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2064696

Summary: The /etc/tmux.conf file created has root 600 permissions, which delays the user login
Product: Red Hat Enterprise Linux 8 Reporter: Welterlen Benoit <bwelterl>
Component: scap-security-guideAssignee: Vojtech Polasek <vpolasek>
Status: CLOSED ERRATA QA Contact: Milan Lysonek <mlysonek>
Severity: medium Docs Contact: Jan Fiala <jafiala>
Priority: unspecified    
Version: 8.5CC: ggasparb, jafiala, jcerny, matyc, mburket, mhaicman, mlysonek, vpolasek, wsato
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: scap-security-guide-0.1.63-1.el8 Doc Type: Bug Fix
Doc Text:
.OpenSCAP remediation sets correct permissions for `/etc/tmux.conf` Previously, when remediating the SCAP rule `configure_tmux_lock_after_time`, the `/etc/tmux.conf` file was created with permissions respecting umask (600). This caused `/etc/tmux.conf` to be unreadable by regular users. If a regular user logged in, they received an error message and had to wait for several minutes before a timeout ran out and they were logged in. With this update, the remediation of rule `configure_tmux_lock_after_time` sets specific permissions of `/etc/tmux.conf` to 644. As a result, regular users no longer encounter the error message or login delay.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-08 09:39:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Welterlen Benoit 2022-03-16 11:15:08 UTC
Description of problem:
When applying the ansible or bash remediation for rule:

http://static.open-scap.org/ssg-guides/ssg-rhel8-guide-stig.html#xccdf_org.ssgproject.content_rule_configure_tmux_lock_after_time

The file /etc/tmux.conf has permissions 600 for root user because of a previous rule.


- From ansible doc:
---
If mode is not specified and the destination filesystem object does not exist, the default umask on the system will be used when setting the mode for the newly created filesystem object.
---

- And we can see in the same STIG guide (http://static.open-scap.org/ssg-guides/ssg-rhel8-guide-stig.html#!) that umask must be set to 077:
---
Ensure that Users Have Sensible Umask Values   Group contains 5 rules
Group   Ensure that Users Have Sensible Umask Values   Group contains 5 rules http://static.open-scap.org/ssg-guides/ssg-rhel8-guide-stig.html#xccdf_org.ssgproject.content_group_user_umask
---

Then all normal user will have a message "/etc/tmux.conf: Permission denied" and 'stuck' for 2.5 minutes when login.

Version-Release number of selected component (if applicable):
RHEL 8.5

How reproducible:
Always

Steps to Reproduce:
1. apply stig ansible role https://github.com/RedHatOfficial/ansible-role-rhel8-stig
2. login with non root user
3. 

Actual results:
- /etc/tmux.conf with wrong permissions
- Message "/etc/tmux.conf: Permission denied" with delay to have the prompt

Expected results:
- right permissions and no delay to login

Additional info:

Comment 7 Jan Černý 2022-07-01 10:45:34 UTC
PR has been opened in upstream https://github.com/ComplianceAsCode/content/pull/9080

Comment 8 Jan Černý 2022-07-18 14:30:16 UTC
The PR https://github.com/ComplianceAsCode/content/pull/9080 has been merged upstream.

Comment 18 errata-xmlrpc 2022-11-08 09:39:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (scap-security-guide bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7563