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.txtRunning as Administrator
Section titled “Running as Administrator”sudo apt updateBest Practices
Section titled “Best Practices”- Check permissions with
ls -l. - Only use
777as a last resort. - Use
sudoonly when necessary.