Bug 1722387
Summary: | umask set from etc/profile | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Martin Osvald 🛹 <mosvald> |
Component: | setup | Assignee: | Pavel Zhukov <pzhukov> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | bfinger, byodlows, marcosfrm, otaylor, ovasik, pknirsch, pzhukov, sbonnevi, tmraz, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-07-03 09:57:39 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1807957 | ||
Bug Blocks: | 1283670 |
Description
Martin Osvald 🛹
2019-06-20 08:44:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'. *** Bug 1801569 has been marked as a duplicate of this bug. *** Adding Tomas Mraz to this bz, as this would require change in pam system-auth.pamd file. Tomas, are you fine with adding the umask snippet there? I agree it is better place to set umask than profile files from setup. Once added there in rawhide, I can remove the snippets from setup profile files in rawhide. Please note that pam_umask is already called from /etc/pam.d/postlogin. We just need to adjust things in /etc/login.defs so the UMASK value is changed to 022. But to be able to do that we need a new shadow-utils which support a new option HOME_MODE in login.defs which needs to be set to 077 so the permissions of the home directories created for new users is not changed from the expected rwx------. I do not think that the default umask should be 002 for regular users. Hi Tomas, Do I understand correctly we're all set for now: https://src.fedoraproject.org/rpms/shadow-utils/c/7309a53c2af98c76e438e050f9dafa0d49175b46?branch=master ? Yes, shadow-utils-4.8.1-2.fc33 should have all the necessary changes for pam_umask to apply umask 022 by default. (In reply to Tomas Mraz from comment #4) > > I do not think that the default umask should be 002 for regular users. So this is Fedora/RHEL behaviour since a long time. I am all in for changing it, but let's hope a can of worms will not be open by the change... :-( Change the thing in Rawhide and let's see. shadow-utils-4.8.1-2.fc33 + setup-2.13.7-1.fc33 will change default umask for regular users from 002 to 022, no? Needs documentation somewhere. /etc/profile was changed to remove the code to set umask, but similar code was left in /etc/bashrc - so if you have an interactive non-login shell (like the default for gnome-terminal), the umask stayed 0002. Sent mail to devel.org to see what people think - https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CHZSH7UCPPOTTRYI7MYBU2JDN2JFQOJJ/ (In reply to Owen Taylor from comment #9) > /etc/profile was changed to remove the code to set umask, but similar code > was left in /etc/bashrc - so if you have an interactive non-login shell > (like the default for gnome-terminal), the umask stayed 0002. > > Sent mail to devel.org to see what people think - > https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ > thread/CHZSH7UCPPOTTRYI7MYBU2JDN2JFQOJJ/ We're seeing the same issue in the RHCSA training. We've received at least one bug report because this breaks User Private Groups settings: https://training-feedback.redhat.com/browse/RH124-744. |