Lock a File Down to Your User with chmod 600

Make sensitive files readable only by you, and scripts executable, using octal permission modes.

macOSchmodpermissionsprivacysecurityMedium risk
Run chmod 600 ~/Documents/secret.txt so only your account can read and write it; use chmod 755 script.sh when you also need execute permission.

01Command

Command
$ chmod 600 ~/Documents/secret.txt   # private: only you; chmod 755 script.sh makes it executable

02What 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

RiskMedium risk
RequirementsCannot be applied on drives that ignore POSIX permissions (e.g. FAT/exFAT USB sticks).
!Warning: Permissions don't protect data on FAT/exFAT drives, and they don't encrypt — anyone with admin rights can still reset ACLs; for real secrecy use an encrypted disk image.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • chmod - Change Access Permissions
    SS64 · technical · 2026-09-17
    Evidence: 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 page
    manpagez.com · technical · 2026-09-17
    Evidence: 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