Learn the Terminal
Ownership & Permissions
Understand chown, chmod and safe Linux access controls before application folders are created.
Guide difficulty⭐⭐⭐⭐⭐ Beginner Friendly
Estimated time⏱️ Around 25–35 minutes
By the end of this lesson you will understand
- The difference between ownership and permissions.
- What
chownandchmoddo. - What 755, 775, 644 and 777 mean.
- Why 777 is usually the wrong permanent fix.
Ownership
Every file and folder has an owner and group. Incorrect ownership can prevent an application from reading or writing its data.
ls -l
sudo chown serveradmin:serveradmin file.txt
sudo chown -R serveradmin:serveradmin /storage/mediaThe name before the colon is the owner. The name after it is the group. -R includes everything inside the folder.
Permissions
Permissions control who can read, write or execute an item.
How the numbers work
The values are added: 7 means read + write + execute, 6 means read + write, and 5 means read + execute. The three digits apply to owner, group and everyone else.
Common modes
| Mode | Meaning |
|---|---|
755 | Owner can change it; others can read and enter it. |
775 | Owner and group can change it; others can read and enter it. |
644 | Owner can change it; others can read it. |
777 | Everyone has full access. |
What sudo means
sudo runs one command with administrator privileges. Read the full command and confirm every path first.
Safety rules
- Use the narrowest practical permissions.
- Check paths before recursive changes.
- Do not make 777 a permanent shortcut.
- Record important ownership or permission changes.
Download the complete reference
Linux Command Cheat Sheet
Keep a local copy with your private server documentation.