The umask command
Display or set file mode mask. 4 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.
Options in the examples
-S- makes the output symbolic; otherwise an octal number is output
Examples
umask0022
umask -Su=rwx,g=rx,o=rx — what new files may get
umask 077only I can read and write what I make
(umask 077; echo "token=abc123" > secret.txt)