Lock a File Down to Your User with chmod 600
Make sensitive files readable only by you, and scripts executable, using octal permission modes.
01Command
$ chmod 600 ~/Documents/secret.txt # private: only you; chmod 755 script.sh makes it executable02What it does
The three digits are owner/group/others, each a sum of read=4, write=2, execute=1. 600 (rw-,---,---) is the standard for private keys and personal documents; 644 is fine for ordinary documents; 755 (rwx,r-x,r-x) is the conventional mode for scripts and folders you want others to enter. Check the result with ls -l.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- chmod - Change Access PermissionsEvidence: Explains the octal permission model where 600 gives the owner read/write and no access to group/others, and 755 grants owner full plus group/others read+execute.
- chmod(1) man pageEvidence: The chmod man page documents the absolute octal modes (e.g. 600, 755) built from owner/group/others read-write-execute bits.
Last verified: 2026-09-19 · Category: Security & Privacy
06Related solutions
See the extended ACL entries and file flags that plain ls -l and Unix chmod know nothing about.
Build an AES-256 encrypted .dmg vault from the Terminal — no Disk Utility clicking required.
Check whether an application bundle was signed properly and hasn't been modified since.