umask
Sunday, March 23rd, 2008Please see these explainers first:
- Root, Superuser, and User Management Basics
- Understanding /etc/passwd, /etc/group, /etc/sudoers, and /etc/skel/
- Linux file permissions
- How to change a file’s owner and group in Linux
Umask is the number subtracted from the standard permissions when creating a file. Example: each new file is by default created with 666, so when umask is set to 022, the result is that the permissions will be 666 - 022 = 644 ( meaning read-write for the owner and only read for the group and all others.