chmod 644 Explained — Owner Read-Write, Others Read-Only
Understand the 644 permission in Linux. Owner can read and write; group and others can only read. The standard permission for regular files.
Detailed Explanation
What Does chmod 644 Mean?
Permission 644 is the default for most regular files on Linux systems. It provides a sensible balance between usability and security:
| Role | Octal | Symbolic | Permissions |
|---|---|---|---|
| Owner | 6 | rw- | Read + Write |
| Group | 4 | r-- | Read only |
| Others | 4 | r-- | Read only |
Breaking Down the Digits
- 6 (Owner): Read (4) + Write (2) = 6. The owner can view and modify the file.
- 4 (Group): Read (4) only. Group members can view but not change the file.
- 4 (Others): Read (4) only. Everyone else can view the file.
Where Is 644 Used?
# Regular files
chmod 644 index.html
chmod 644 styles.css
chmod 644 config.json
# System configuration (non-sensitive)
ls -l /etc/hostname
# -rw-r--r-- 1 root root ... /etc/hostname
# Web content files
chmod 644 /var/www/html/*.html
Why Not 666?
Permission 666 (rw-rw-rw-) allows everyone to write to the file, which is almost never desired. Using 644 ensures that only the owner can make modifications while the file remains readable by scripts, web servers, and other users.
644 and umask
On most Linux systems, the default umask is 022, which means newly created files get 666 & ~022 = 644. This is why 644 appears so frequently — it is the system default for new files.
Use Case
Use 644 for HTML files, CSS stylesheets, configuration files (without secrets), text documents, images, and any file that should be readable by all users but only editable by the owner. Most files served by a web server should be 644.
Try It — Linux Permission Reference
Related Topics
chmod 755 Explained — Owner Full, Others Read+Execute
Common Permissions
chmod 600 Explained — Owner-Only Read-Write
Common Permissions
chmod 664 Explained — Owner+Group Read-Write, Others Read-Only
Directory & Web
Understanding umask 022 — The Linux Default
Umask & Defaults
Web Server File Permissions — Apache, Nginx, and PHP
Directory & Web