Default file permissions

Updated: May 06, 2022

Use the umask command to specify the mask for setting the permissions on new files.

The default mask is 002, so any new files give read and write permission to the user (i.e., the owner of the file) and the rest of the user's group, and read permission to other users. If you want to remove read and write permissions from the other users, add this command to your .profile:

umask 006

If you're the system administrator, and you want this change to apply to everyone, change the umask setting in /etc/profile. For more information about profiles, see Configuring Your Environment.