Isso ocorre porque, em /etc/login.defs
, o padrão umask
é definido como 022 quando seu diretório pessoal é criado. 022 é a umask "histórica" que existia antes da ideia de grupos privados surgirem. Mas USERGROUPS_ENAB yes
in /etc/login.defs
muda para 002 (para qualquer coisa criada depois que seu diretório home é criado).
As configurações em /etc/adduser.conf
substituirão a mencionada acima somente se os grupos privados estiverem desativados. A motivação para mudar para 002 é que, com o surgimento de grupos privados, 022 tornou-se muito restritivo, por exemplo: para configurar diretórios compartilhados.
Você pode ver mais informações sobre isso no Lauchpad e Log de bugs da comunidade . Além disso, de /etc/login.defs
:
> # UMASK is the default umask value for pam_umask and is used by
> # useradd and newusers to set the mode of the new home directories.
> # 022 is the "historical" value in Debian for UMASK
> # 027, or even 077, could be considered better for privacy
> # There is no One True Answer here : each sysadmin must make up his/her
> # mind.
> #
> # 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.
# 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