Operating System - HP-UX
1829081 Members
2428 Online
109986 Solutions
New Discussion

Re: how to set the umask value for a user

 
SOLVED
Go to solution
praveen..
Super Advisor

how to set the umask value for a user

Hi,
i need to set the umask value 022 for a local user,

how to do it,
user name is oracle.

please suggest,

what does 022 means?
8 REPLIES 8
Sivakumar TS
Honored Contributor
Solution

Re: how to set the umask value for a user



Hi Praveen,

You may add the umask entry in the profile of the user. It basically sets the mask applied to newly created file and directory permissions

Regards,

Siva
Nothing is Impossible !
Ninad_1
Honored Contributor

Re: how to set the umask value for a user

In user oracle's .profile add the line umask 022 at the end.

022 means any new file created will have permissions -rw-r--r--
and any new dir created will have drwxr-xr-x

Regards,
Ninad
Arunvijai_4
Honored Contributor

Re: how to set the umask value for a user

Hi Praveen,

You need to set this up in his .profile. You can find this file in $HOME dir. Just add
umask=022

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Ludovic Derlyn
Esteemed Contributor

Re: how to set the umask value for a user

hi,

for set umask , need to define in .profile of user

022 correspond to 755

Regards

Raj D.
Honored Contributor

Re: how to set the umask value for a user

Hi Praveen,

You can include that in .profile in that user ,

example:
# cd ~username
# cat .profile >> umask=022

that will set the user umask to 022


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: how to set the umask value for a user

Hi Praveen,

You can include that in .profile in that user ,

example:
# cd ~username
# echo " umask 022 " >> .profile

(Mistake in last post ,)

that will set the user umask to 022


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Arunvijai_4
Honored Contributor

Re: how to set the umask value for a user

Hi Praveen,

Take a look at this, http://www.sun.com/bigadmin/content/submitted/umask_permissions.html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
praveen..
Super Advisor

Re: how to set the umask value for a user

i have put "umask 022" in .profile of user

thanks everybody :-)