• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mask 022 and 077

 
Enge Chall
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain the mask 022 and 077 in the .profile on AIX.
How to mask and unmask in AIX ?
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If i'm not mistaken its like the umask command in linux.

Basically it tells the system with which permissions to create new files.
For example, in linux for each file there is a number (several actually) that show the permission of the owner, group and everyone else to read/write and execute the file.
In numbers it is: read=4 write=2 and exec=1

So the number 7 indicates you can read write and exec the file.
The number 5 means you can only read and exec and you get the idea...

The umask is the minus number that gets applied to all new files. So if usally a file is created with 666 permissions (everybody can read and write to it) then a umask of 022 means that the real number it gets created with is 644 - so only you can read/write and the rest can only read.

Hope it made sense and that it is correct for AIX as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic