I am learning about UNIX, permission bits, and umask. What should be the umask value to ensure that the extra bits cannot be set?
Asked
Active
Viewed 1,073 times
1 Answers
1
It can be any, depending on what do you mean by "extra". There are some standard cases:
- To create files accessible in any means only by the owner, use 077.
- To create files readable by the group, readable and writable by the owner, use 027.
- To create files readable by any but writable only by the owner, use 022.
All these values are written in octal (C-styled prefix '0' for an octal number).
Notice that execution flags are set by default on directories only.

Netch
- 4,171
- 1
- 19
- 31