Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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

UMASK 077
share|improve this answer
    
Just tested this, and it worked! Thank you! –  Soviero Nov 4 '11 at 2:49

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
share|improve this answer
    
ARGH! You beat me to it once again! –  Rilindo Nov 4 '11 at 2:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.