How to set umask

I need to change umask settings for 2 users. What is the syntax for doing this?
sikyalaSenior Database AdministratorAsked:
Who is Participating?
Example you have 2 users "bob" and "alice"

From root :-

# vi  ~bob/.bashrc
umask 0022

Save and quit.
Then do the same thing for alice

# vi ~alice/.bashrc
umask 0022

What they will get is,
when they create new FOLDER, permission will be
0777 - 0022 = 0755 (drwxr-xr-x)

when they create new FILE, permission will be
0666 - 0022 = 0644 (-rw-r--r--)

Good Luck,

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.