#1068674 Document pam_umask change in release notes

Package:
src:pam
Source:
src:pam
Submitter:
Christoph Anton Mitterer
Date:
2025-08-14 10:01:01 UTC
Severity:
normal
#1068674#5
Date:
2024-03-09 23:29:28 UTC
From:
To:
Hey.

Somwhere in between 1.5.2-9.1+b1 and 1.5.3-6 the default umask for non-root
users has changed from 0022 to 0002.
Interestingly, root doesn't seem to be affected.

Intially I suspected b01196659c785b04abc387d324fae61e2ec3b1aa, but at least
when re-commenting the:
in both files again, it still stays at 0002.

I don't so much mind the change itself, but shouldn't such a big change
go at least into NEWS.Debian and probably also he release notes?

Cheers,
CHris.

#1068674#10
Date:
2024-03-12 17:19:05 UTC
From:
To:
The change of behaviour can have an unexpected and quite nasty
side-effect, by applying a misconfiguration that was ignored until this
update.

A setting of "UMASK 077" in /etc/login.defs was ignored before this
update, and is now applied (as it should) leading to unreadable files
if the user is not expecting it.

In my case this was a misconfiguration, as I thought it was a setting
applied only to the $HOME directory itself (I should have used
"HOME_MODE 0700" instead). But since it had no effect until the recent
update, I got taken by surprise with files generated with rw-rw----
permissions when I was expecting the regular rw-r--r--.

I am not bumping the severity of this bug report because the new
behaviour is the correct one, but it should be kept in mind that other
people might get unexpected effects from this update.

#1068674#15
Date:
2024-03-14 20:32:56 UTC
From:
To:
Good Day,

I also noticed this change recently, and found it jarring, albeit mostly
cosmetic.  The notes in /etc/login.defs do imply that it is up to
administrators, who we know have differing opinions on all matters of
topics.  For example, I would like to keep the old USERGROUPS_ENAB set
to "yes", *and* to have a default umask of 022 (for reasons; even if
that does not make a lick of sense).  Also, I often do have multiple
users on my systems who belong to a single group (something like
"users").

I remember posting on systemd @ github about how they were choosing to
handle, or not handle values in /etc/login.defs--or, maybe something
else semi-related--at a time in ancient history.  The details, I do not
recall.  But, I do not blame, nor believe, the systemd project has
anything to do with this particular change.  Please correct me, if I am
wrong!  And, maybe I can even be convinced that one handling of umasks
is better than...

Here is how I am handling it now...

In the default .bashrc for *root*, ever since I can remember, I have had
a configuration line commented out, which allows setting the umask value
to 022 for root.  This is how it still behaves by default anyway, as
stated above.  However, I am thinking to go ahead and...

I prefer the way it is handled per user.  There is a related, commented
out, option in /etc/skel/.profile, which lands in new user directories,
which I have never touched the umask part until now.  I uncommented the
line to set the users' default umask settings to 022 and updated users
already on the system.

At your own risk, if you follow along further :)

It was fun to see and reset the permissions on files since the change,
with:

~$ find . -type f -perm 664

and, upon confirming these are (mostly) the new files that I would have
preferred to have different permissions (as before), reset them all
with:

~$ find . -type f -perm 664 -execdir chmod 644 '{}' '+'

(Note: wireplumber keeps some state files in my home folders at 664,
which I guess is just the way they want it.  Some other programs may
prefer different permissions and reset them, also.  We will see!)

So far, I have not inspected, nor determined, whether directory
permissions were affected in a way I might find jarring.

Lastly, I already have .bash_profile and .xsessionrc doing little else
than 'sourcing' .profile and setting a few variables where appropriate.
I don't SSH into the box very often, so I am unsure if the umask holds
in various other situations.

Just my two cents,

Professor Jeebs

#1068674#20
Date:
2024-04-08 20:13:11 UTC
From:
To:

    Professor> I prefer the way it is handled per user.  There is a related, commented
    Professor> out, option in /etc/skel/.profile, which lands in new user directories,
    Professor> which I have never touched the umask part until now.  I uncommented the
    Professor> line to set the users' default umask settings to 022 and updated users
    Professor> already on the system.


Just confirming.  You could have modified /etc/login.defs if you chose
and gotten a similar affect, right?

#1068674#25
Date:
2024-04-08 20:51:12 UTC
From:
To:
I think the file to edit is actually /etc/pam.d/common-session, adding
the "nousergroups" option in the line with pam_umask.so.  That is what I
did after reading the pam_umask(8) manpage.

Cheers,
       Sven

#1068674#30
Date:
2024-04-08 22:18:25 UTC
From:
To:
control: clone -1 -2
control: retitle -2 Document pam_umask change in release notes

#1068674#39
Date:
2024-04-09 15:45:42 UTC
From:
To:
Hey.

Also with respect to having this documented in the release note, you
may want to have a look at my comment:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065806#47

I.e. I think it might be usefull to not just indicate that/how people
may use "nousergroups" again, but also to refer to alternatives (like
setting a per-user default UMASK via GECOS) by referring to the
pam_umask(8) manpage.


Cheers,
Chris.

#1068674#44
Date:
2025-08-14 10:00:00 UTC
From:
To:
Sam, et al,

Should this be reassign-ed to release-notes ?

Thank you!
Danie Lewart
Urbana, Illinois