Where is my umask being set to 0002?
Bijan Soleymani
bijan at psq.com
Wed Apr 13 13:42:00 UTC 2022
On 2022-04-13 08:06, Chris Green wrote:
> On Wed, Apr 13, 2022 at 05:02:06AM -0700, Smoot Carl-Mitchell via ubuntu-users wrote:
>> On Wed, 2022-04-13 at 11:41 +0200, Ralf Mardorf via ubuntu-users wrote:
>>> Maybe in /etc/login.defs ?
>>
>> You can set it in your .profile or your.bashrc startup file for the
>> bash shell or in /etc/profile globally.
>
> OP here, yes I know how to set the umask, what I was asking was where
> is the default value set?
>
Seems it is set to 022 in /etc/logins.def
With the following comment:
# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK
default value
# for private user groups, i. e. the uid is the same as gid, and username is
# the same as the primary group name: for these, the user permissions
will be
# used as group permissions, e. g. 022 will become 002.
And by default USERGROUPS_ENAB is set to yes. More comment from there:
# Enable setting of the umask group bits to be the same as owner bits
# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
# the same as gid, and username is the same as the primary group name.
#
# If set to yes, userdel will remove the user's group if it contains no
# more members, and useradd will create by default a group with the name
# of the user.
#
USERGROUPS_ENAB yes
I can confirm that setting USERGROUPS_ENAB to no will change user umask
to 0022.
Bijan
More information about the ubuntu-users
mailing list