Permissions and Advanced Management
Linux Permissions
Section titled “Linux Permissions”Each file/directory has permissions: read (r), write (w), execute (x).
They apply to:
- u → user (owner)
- g → group
- o → others
Changing Permissions
Section titled “Changing Permissions”chmod 755 script.shchmod u+x file.sh
➡ 755
= user: rwx, group and others: rx
Changing Ownership
Section titled “Changing Ownership”chown user:user file.txt
Running as Administrator
Section titled “Running as Administrator”sudo apt update
Best Practices
Section titled “Best Practices”- Check permissions with
ls -l
. - Only use
777
as a last resort. - Use
sudo
only when necessary.