Super User is a question and answer site for computer enthusiasts and power users. 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

My question is similar to this:

but there is no scp/ftp client involved and that question looks abandoned. Simply put: I want to be able to, at some global level decree that all newly created files will never have world writable permissions (0775).

I tried putting a umask 02 in /etc/profile then in my bash_profile but it only works for scripts or new files that I create in a shell. It doesn't work for files that another binary creates. Is there anyway to have all new files that are created?

share|improve this question

migrated from Oct 1 '09 at 16:34

This question came from our site for professional and enthusiast programmers.

It's possible you may be able to do what you want by modifying the mount - either giving it a umask in /etc/fstab (umask=xxxx in the options section, but this is not available for ext*) or by chmod-ing the mountpoint. – Jefromi Oct 1 '09 at 13:49
Good description here:… – erikxiv May 1 '12 at 9:54

What you want is the UMASK setting in the /etc/login.defs file.

share|improve this answer
The description in my /etc/login.defs says: Umask which is used be useradd and newusers for creating new home directories. Doesn't sound like a global level decree for all services/ processes. – K B Feb 22 '13 at 9:07

umask is what you want...

share|improve this answer

Your Answer


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