Skip to main content

Manage the read/write/execute permissions that are masked out (i.e. restricted) for newly created files by the user.

# Manage the read/write/execute permissions that are masked out (i.e. restricted) for newly created files by the user.

# To display the current mask in octal notation:
umask

# To display the current mask in symbolic (human-readable) mode:
umask -S

# To change the mask symbolically to allow read permission for all users (the rest of the mask bits are unchanged):
umask <a+r>

# To set the mask (using octal) to restrict no permissions for the file's owner, and restrict all permissions for everyone else:
umask <077>