Skip to content

Commit

Permalink
Update linux_basics.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bclaremar authored Aug 22, 2023
1 parent 218cafd commit 4aabd22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/linux_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,19 +518,20 @@ $ ls -l
- `<mode>` can be e.g.:
- `u+x` : lets You (owner) run a script you just wrote
- `-w` : no write permissions for **owner+group** (warning: if `w` was set for others it will be kept!!)
- `-w` : no write permissions for **owner+group**
- warning: if `w` was already set for *others* it will be kept!!
- `+rw` : let user and group members read and edit this file, not others if not already set
- `=xw` : let group members go into your directory and put files there, but not see which files are there, others are not affected
- `a=xw` : set xw for everyone
- chmod takes flags as usual, e.g.
- `-R` for recursive (i.e. all files and sub-directories therein)
``````{solution} chmod 755 style - "octal bit mask”
``````{solution} chmod 755 style - binary sum - "octal bit mask”
- Online, you will come across e.g. `chmod 755`. What does this mean? It’s an "octal bit mask”:
- Each digit correspond to the binary sum for the owner, group and others, respectively.
- Each digit corresponds to the **binary sum** for the *owner*, *group* and *others*, respectively.
- ``7 = 4 + 2 + 1 = r + w + x`` All permissions
- ``5 = 4 + 0 + 1 = r + + x`` Read and execute permission
Expand Down

0 comments on commit 4aabd22

Please sign in to comment.