The Octal Notation And umask
- When we create a new File, the operating system first takes the
default permissions ('rw-rw-rw-', or 0666 in octal).
- Then, every bit that is set in the
umask, is being cleared in the
permissions.
- The resulting number is set as the permissions given to the File.
- This sounds complicated - but after a while you get used to it.
- Eventually, we set a umask in our shell's
start-up script, write a comment explaining what it does, and then
forget about it.
Originally written by
guy keren