Skip to content

Instantly share code, notes, and snippets.

@BruceZu
Last active January 12, 2017 18:22
Show Gist options
  • Select an option

  • Save BruceZu/5362d38c358c4e8e88440e137f14181f to your computer and use it in GitHub Desktop.

Select an option

Save BruceZu/5362d38c358c4e8e88440e137f14181f to your computer and use it in GitHub Desktop.
chmod OWNER GROUP WORLD PATH
4 read (r)
2 write (w)
1 execute (x)
7 = 4+2+1 (read/write/execute)
6 = 4+2 (read/write)
5 = 4+1 (read/execute)
4 = 4 (read)
3 = 2+1 (write/execute)
2 = 2 (write)
1 = 1 (execute)
chmod 666 mydoc.txt read/write by anybody! (the devil loves this one!)
chmod 755 mydoc.txt rwx for owner, rx for group and rx for the world
chmod 777 mydoc.txt read, write, execute for all! (may not be the best plan in the world...)
http://www.linux.org/threads/file-permissions-chmod.4094/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment