| |
Numeric modes | page 11 of 23 |
Up until now, we've used what are called "symbolic" modes to specify
permission changes to chmod. However, there's another
commonly-used way of specifying permissions -- using a 4-digit octal number.
Using this syntax, called numeric permissions syntax, each digit represents a
permissions triplet. For example, in 1777, the 777
set the 'owner', 'group', and 'other' flags that we've been discussing through
this section. The 1 is used to set the special permissions bits,
which we'll cover at the end of this section. This chart shows how the second
through fourth digits (777) are interpreted: mode | digit | rwx | 7 | rw- | 6 | r-x | 5 | r-- | 4 | -wx | 3 | -w- | 2 | --x | 1 | --- | 0 |
|