umask
Manage the read/write/execute permissions that are masked out (i.e. restricted) for newly created files by the user. More information: https://manned.org/umask.
-
Display the current mask in octal notation:
umask
-
Display the current mask in symbolic (human-readable) mode:
umask -S
-
Change the mask symbolically to allow read permission for all users (the rest of the mask bits are unchanged):
umask {{a+r}}
-
Set the mask (using octal) to restrict no permissions for the file's owner, and restrict all permissions for everyone else:
umask {{077}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.