0

If I am not wrong, this is how umask is calculated.

for dir,  777 - 022(root's umask value) = 755.
for file, 666 - 022(root's umask value) = 644.

Now, where this umask value is defined? Is it the /etc/bashrc file?.

If so, then what is the file /etc/login.defs for? My /etc/login.defs file says 077 as umask - what does this mean?

Also where is cmask defined?

The umask can be changed using umask command, but that is temporary. Right? If I have to make it permanent, I can edit .bashrc file in my home dir and append "umask value" to it.

Also, say I am root and I want to set a specific umask for all other users, how to do that?

Braiam
  • 35,991
Gokul
  • 1,071
  • Umask is actually applied using bit operations: 0777 & ~022. Does Wikipedia or any other search result for umask cmask or umask login.defs answer your question? – Lekensteyn Jul 27 '13 at 21:42
  • Nope. I can't find a proper answer. Thought posting in public forum might help. Will try finding answers anyway and if i am successful, will update the same here. – Gokul Jul 27 '13 at 22:28

0 Answers0