I read "Linux Bible 10th Edition", chapter 4: Becoming a Linux Power User, at 109 page. Second paragraph:
$ umask
0002
If you ignore the leading zero for the moment, the umask value masks what is considered to be fully opened permissions for a file 666 or a directory 777. The umask value of 002 results in permission for a directory of 755 (
rwxrwxr-x
). That same umask results in a file permission of 644 (rw-rw-r--
). (Execute permissions are off by default for regular files.)
I wonder why umask value of 002 is calculated for file like 644? As I understood 666 - 002 = 664. Btw, permissions in parentheses looks like 664.