I'm new to Linux. I have been practicing a few commands. My question is about when I'm creating different files using a different umask. For example:
umask 222, as I understand it, is the same as 777 - 222 = 555, so when I create a new file (call it "newfile"), then newfile's permissions should be
r-xr-x-r-x (or am I wrong?)
Whatever: "newfile" was created with
umask value in
if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then umask 002 else umask 022 fi
My uid is 1002.
Note: Just for the record, I've already read all the umask questions and documentation from
man and I can't understand it yet.