I am setting default umask of linux box for the first time. I log in as root user on a Centos 6 server. I want these default values:
owner: read/execute/write (7)
group: read/execute (5)
other: read (4)
To get umask value, I deduct targets from 777: 777-754 = 023
# umask 023
then do a double check
# umask -S
u=rwx,g=rx,o=r
then create and display file permissions
# echo x > testfile.txt
# ll | grep testfile.txt
-rw-r--r--. 1 root root 4 Jun 26 01:15 testfile.txt
which is not quite what I was expecting.