umask Explained: Why New Files Are 644
How 022, 002 and 077 turn into file and folder permissions.
By the TurantTools Dev team · Updated October 27, 2026 · 2 min read
Why are new files created as 644 and folders as 755? Because of the umask: a mask of permissions to take away. Files start from 666 and folders from 777, and the umask removes bits from them.
| umask | New files | New folders |
|---|---|---|
| 022 | 644 (rw-r--r--) | 755 (rwxr-xr-x) |
| 002 | 664 (rw-rw-r--) | 775 (rwxrwxr-x) |
| 077 | 600 (rw-------) | 700 (rwx------) |
- 022 is the usual default: others can read but not write.
- 002 suits shared group folders, where team members need to edit each other's files.
- 077 keeps everything private; good for a user running services with secrets.
- Check yours with
umask; set it in your shell profile or the service's unit file.