0

I am learning about UNIX, permission bits, and umask. What should be the umask value to ensure that the extra bits cannot be set?

RockOn
  • 197
  • 1
  • 19

1 Answers1

1

It can be any, depending on what do you mean by "extra". There are some standard cases:

  1. To create files accessible in any means only by the owner, use 077.
  2. To create files readable by the group, readable and writable by the owner, use 027.
  3. 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