Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 down vote accepted

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

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.

# 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


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.