Breakdown
| Class | Digit | Symbolic | Read | Write | Execute |
|---|---|---|---|---|---|
| Owner (u) | 7 | rwx | ✔ | ✔ | ✔ |
| Group (g) | 0 | --- | — | — | — |
| Others (o) | 4 | r-- | ✔ | — | — |
owner 7 = 4 + 2 + 1 · group 0 = 0 · others 4 = 4
Commands
chmod 704 file.txt
chmod u=rwx,g=,o=r file.txt # same thing, symbolic
chmod -R 704 folder/ # recursive (careful: applies to files and directories)
find folder -type d -exec chmod 704 {} + # only directories
Applied to a directory
- Owner (u): can list names, can create/delete entries, can enter (cd) and access files.
- Group (g): cannot list names, cannot create or delete entries, cannot enter.
- Others (o): can list names, cannot create or delete entries, cannot enter.
Things to know
- No unusual risks: this is a conventional combination.