Question

3. Explain the differences among the following unmask values: 077, 027, 022, and 755. How would...

3. Explain the differences among the following unmask values: 077, 027, 022, and 755. How would you set one of these values as a site-wide default for new users? Can you impose an unmask standard on your users?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

What is umak?

In linux/unix, the user file-creation mode mask (umask) is used to determine file permissions for newly created files or folders. Generally we use umask to control the default file permission.

How to calculate Umask:
The octal umasks assigned based on bitwise AND of the unary complement of the argument using bitwise NOT.
The values are as follows:

Octal value : Permission
0 : read, write and execute
1 : read and write
2 : read and execute
3 : read only
4 : write and execute
5 : write only
6 : execute only
7 : no permissions

So as per above,

027: By default permission for file is 640 and directory 750 other have no permissions.
022: Generally it is used for root user.Directory permissions are 755 and file permissions are 644.
077: This umask is for private. No other user can read or write data.

How to set umask?
We can setup umask in /etc/bashrc or /etc/profile file.
Commands to set umask:

# vi /etc/profile
umask 022


Add a comment
Know the answer?
Add Answer to:
3. Explain the differences among the following unmask values: 077, 027, 022, and 755. How would...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT