cancel
Showing results for 
Search instead for 
Did you mean: 

umask

indianya
Occasional Contributor

umask

I have a following HP-UX system
HP-UX B.11.11 U 9000/800

I have ensured that umask doesn't get set in /etc/profile and .profile

However, the default umask is set to 077 rather than 022. Can someone explain at what stage during booting process and from which configuration file does default umask value gets set?
4 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: umask

Hi:

The '/etc/profile' and '${HOME}/.profile' are sourced (read) in that order for user logins whose default shell (as specified in '/etc/passwd') is the POSIX shell ('/sbin/sh' or '/usr/bin/sh') or the Korn shell ('/usr/bin/ksh'). If your user is defined with the C-shell as a default ('/usr/bin/csh') then different rules apply --- see the FILES section of the 'csh' manpages.

Regards!

...JRF...
Robert-Jan Goossens
Honored Contributor

Re: umask

Hi,

You could check the umask setting in the /sbin/init.d/inetd script.

If you change the setting in this script, you will have to restart the inet daemon.

# /sbin/init.d/inetd stop
# /sbin/init.d/inetd start

Regards,
Robert-Jan
Robert-Jan Goossens
Honored Contributor

Re: umask

Hi,

You could check the umask setting in the /sbin/init.d/inetd script.

The umask for inetd is normally set in the script /sbin/init.d/inetd. The default value is 000. This can be modified, then the inetd umask can be changed by executing:

# /sbin/init.d/inetd stop
# /sbin/init.d/inetd start

Regards,
Robert-Jan
Dennis Handly
Acclaimed Contributor

Re: umask

>I have ensured that umask doesn't get set in /etc/profile and .profile

Ensured as in edited those files and removed it? Or just checked and you can't find it?

I think umask for normal users gets set in /sbin/rc or in some file(s) in /etc/rc.config.d/*.
There maybe other umask settings as mentioned by Robert-Jan. And one by ftpaccess(4).