Linux File Permissions Explained: chmod, chown, and umask
Linux file permissions control who can read, write, and execute files. Understanding chmod, chown, and umask is essential for secure server administration.
What you will learn
Core commands for daily Linux administration
Practical examples you can run on Ubuntu, Debian, or RHEL-based systems
Common mistakes and troubleshooting tips
Check current permissions
Use ls -l to inspect permissions:
ls -l /etc/passwd
The first column shows permission bits such as -rw-r--r--.
Change permissions with chmod
Give the owner execute permission:
chmod u+x script.sh
Use numeric mode for quick changes: chmod 755 script.sh
Change ownership with chown
Assign a file to another user and group:
sudo chown www-data:www-data index.html
Ownership matters for web servers and shared apps.
Understand umask...
