Centos

CentOS 5 上的預設主文件夾權限

  • November 4, 2011

每當我在 CentOS 5 中創建一個新使用者時,他們的主文件夾會自動賦予 UGO 設置“755”,如何將預設設置更改為“700”?

此外,伺服器在技術上是 ClearOS,但它基於 CentOS。

您編輯文件 /etc/login.defs 並將 umask 值更改為:

UMASK 077

將輸入設置UMASK/etc/login.defs077:

#
# 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

引用自:https://serverfault.com/questions/327623