Skip to main content
4 of 4
edited title
muru
  • 77.9k
  • 16
  • 212
  • 318

How is umask calculated in Linux?

So I know umask can restrict privileged users, using this format umask ugo.

I understand that the read = 4, write = 2, and exec = 1. However, when I type umask, it returns 4 digits which is 0022 or 0073. I have no understanding of how does this work now because there is an extra digit. What is that extra digit and what does 0022 mean?

Braiam
  • 36.9k
  • 29
  • 114
  • 176