Skip to content

Instantly share code, notes, and snippets.

@nezarfadle
Created June 6, 2017 11:18
Show Gist options
  • Save nezarfadle/5f9b8b9a854696f8079ce5afa880ac9c to your computer and use it in GitHub Desktop.
Save nezarfadle/5f9b8b9a854696f8079ce5afa880ac9c to your computer and use it in GitHub Desktop.
umask (002)
0 0 2 = 000 000 010
Not 0 0 2 = 111 111 101
110 110 110 AND
111 111 101 =
110 110 100
rw- rw- r--
############
umask (022)
0 2 2 = 000 010 010
Not 0 2 2 = 111 101 101
110 110 110 AND
111 101 101 =
110 100 100
rw- r-- r--
###########
umask (261)
2 6 1 = 010 110 001
Not 2 6 1 = 101 001 110
110 110 110 AND
101 001 110 =
100 000 110
r-- --- rw-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment