# Linux File Permissions: Who Can Read, Write, Execute ## Introduction Every file in Linux has permission rules. Think of it like a house with three doors: owner, group, and everyone else. ## Viewing Permissions Run `ls -l`: -rwxr-xr-- 1 bagus staff 1234 file.txt The first 10 characters describe permissions. ## Permission Letters - `r` = read (view contents) - `w` = write (change contents) - `x` = execute (run as program) ## Three Groups - Owner (user) - Group - Others (everyone else) ## Changing Permissions with chmod chmod 755 script.sh # rwxr-xr-x chmod 644 notes.txt # rw-r--r-- Numbers: 4=read, 2=write, 1=execute. Add them up per group. ## 3 Things to Remember - `ls -l` shows permissions as 10 characters. - `r`=4, `w`=2, `x`=1; sum them for chmod. - 755 = owner full, others read+execute.