每当我在 CentOS 5 中创建新用户时,他们的主文件夹都会自动赋予 UGO 设置“755”,我该如何将默认值更改为“700”?
此外,该服务器从技术上讲是 ClearOS,但它基于 CentOS。
答案1
您编辑文件 /etc/login.defs 并将 umask 值更改为:
UMASK 077
答案2
将输入设置UMASK
为/etc/login.defs
077:
#
# If useradd should create home directories for users by default
# On RH systems, we do. This option is overridden with the -m flag on
# useradd command line.
#
CREATE_HOME yes
# The permission mask is initialized to this value. If not specified,
# the permission mask will be initialized to 022.
UMASK 077