I believe that umask is something that controls file permissions, but do not fully understand it.
umask 0644 in a terminal, I cannot read the files I create with the command-line text editor
nano. I noticed that the permissions of that file are set to
0022 instead of the default
How does umask work? I thought I could just remove the each digit in the umask from
7 - 6 = 1 and
7 - 4 = 3, so I expect the permissions to be
0133, but apparently, this is not the case.
- What is umask exactly? Explain it to me like I was a "Linux noob"
- How do I calculate with umask?
- What are use cases for umask?