This post is older than a year. Consider some information might not be accurate anymore.
http://permissions-calculator.org/ is a nice web application, to calculate octal permissions for chmod.
- The basic chmod command allows the change the access rights for
user + group + others. - The numeric computation consists of 2^2=4, 2^1=2, 2^0=1 = rwx
The current permission scheme in numeric and symbolic values:
| # | Permission | `rwx` |
|---|---|---|
| 7 | read, write and execute (4 + 2 + 1 = 7) | `rwx` |
| 6 | read and write (4 + 2 = 6) | `rw-` |
| 5 | read and execute (4 + 1 = 5) | `r-x` |
| 4 | read only | `r--` |
| 3 | write and execute | `-wx` |
| 2 | write only | `-w-` |
| 1 | execute only | `--x` |
| 0 | none | `---` |