⌨️File Permissions
Also known as Linux File Permissions, Unix Permissions, rwx Permissions
Rules for who may read, change or run a file on Linux.
Think of it like
Think of it like rules on a diary. The owner can write in it. Friends can read it. No one else can.
Example
Lucy's script shows rwxr-x---. She can read, change and run it. Her group can read and run it. Nobody else can touch it.
Why it matters
They stop one user from reading or breaking the files of another. A broken app is held back too.
Definition
Example code
console
$ ls -l run.sh
-rwxr-x--- 1 lucy devs 120 Nov 16 09:30 run.shCommon mistake
Key takeaways
- 1Read, write, run. Three kinds of right.
- 2Owner, group, others. Three sets of people.
- 3Least you need. Give no more than the job needs.