Operating System - HP-UX
1822146 Members
4335 Online
109640 Solutions
New Discussion юеВ

how to change the umask value for the user.

 
unixguy_1
Regular Advisor

how to change the umask value for the user.

how to change the umask o22 value tfor the user?

where we can edit this?

pls anyone brieflyexpalin me ,how to reolve this type of problem.

4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: how to change the umask value for the user.

Hi:

The usual choice is to set the 'umask' in the user's login profile.

Assuming that the user uses the standard HP-UX POSIX shell ('/usr/bin/sh') or the Korn ('/usr/bin/ksh') variation, edit the ${HOME}/.profile and add:

umask 022

...at the end. Make sure that the user logs out and back in to source (read) the newly modified '.profile'.

Regards!

...JRF...
Raj D.
Honored Contributor

Re: how to change the umask value for the user.

unixguy,

>how to change the umask o22 value tfor the user?


If umask variable specified in /etc/profile (Globally ) it will take from there. Otherwise specify in /home/username/.proile



- umask # it will show current umask .

- #vi /home/username/.profile

...
umask 022


- logout and login.
- check with umask command , you will see 022.


cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Suraj K Sankari
Honored Contributor

Re: how to change the umask value for the user.

HI,
Open the user's .profile which you will find user's home directiory.

i.e.
vi /home/user1/.profile

#add this line
umask 022

#save the file

ask user to login and check
Suraj
Dennis Handly
Acclaimed Contributor

Re: how to change the umask value for the user.

>JRF: Make sure that the user logs out and back in to source (read) the newly modified .profile.

Or have the user type that umask command.