1

Whenever I create a new user in CentOS 5, their home folder is automatically given the UGO setting of "755", how can I change the default to "700"?

Also, the server is technically ClearOS, but it's based on CentOS.

Soviero
  • 4,306
  • 7
  • 34
  • 59

2 Answers2

2

You edit the file /etc/login.defs and change the umask value to:

UMASK 077
Rilindo
  • 5,058
  • 5
  • 26
  • 46
1

Set the UMASK in /etc/login.defs to 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
quanta
  • 50,327
  • 19
  • 152
  • 213