Skip to content

Instantly share code, notes, and snippets.

@eeowaa
Last active November 19, 2021 09:15
Show Gist options
  • Save eeowaa/12c715859ea235bd3bfe9fe2147b1d04 to your computer and use it in GitHub Desktop.
Save eeowaa/12c715859ea235bd3bfe9fe2147b1d04 to your computer and use it in GitHub Desktop.
Explanation of *nix directory permission bits, with mnemonic devices
Modecdlsls -lcattouch
--- 0
--x 1xx
-w- 2
-wx 3xxx
r-- 4x
r-x 5xxxx
rw- 6x
rwx 7xxxxx
  • r lets you *read* the directory listing (ls)
  • r with x lets you *read* an *extended* directory listing (ls -l)
  • w alone is *worthless*
  • w with x lets you *write* to files (touch)
  • x lets you *examine* file contents (cat) and *exist* in the directory (cd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment