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?
0777 & ~022
. Does Wikipedia or any other search result forumask cmask
orumask login.defs
answer your question? – Lekensteyn Jul 27 '13 at 21:42