How to Use chmod 644 in Linux
Learn what chmod 644 means and why it is common for ordinary files.
644 is a common mode for non-executable files: rw- for the owner and r-- for group and others.
Step by step
1 Set 644
$ chmod 644 config.txt Sets the mode to rw-r--r--.
2 Verify
$ ls -l config.txt Check the symbolic permissions.
3 Protect a secret
$ chmod 600 .env 600 gives the owner read/write and nobody else access.
Tips worth knowing
- Do not apply 644 blindly to directories or executables.
- Verify parent directory permissions too.
- Credentials usually deserve stricter permissions.
Frequently asked questions
What does chmod 644 mean?
Owner has read/write; group and others have read.
What is the difference between 644 and 755?
644 is rw-r--r--; 755 is rwxr-xr-x.
If it goes wrong
The commands behind it
Change file permissions with numeric (755, 644) and symbolic (u+x) modes — clearly explained.
lsList the contents of a directory, with options for hidden files, long format, sorting and more.
chownAssign files to users and groups — the other half of Linux permissions.
Concepts involved: File permissions
More how-to guides
See how much space is left, and find out what is using it.
Extract a .tar.gz archiveUnpack tar.gz, tar.bz2, tar.xz and zip archives from the command line.
Free a port that is already in useFind which process holds a port and stop it cleanly.
Find and replace text in filesReplace text in one file or across a whole project, safely.