1836519 Members
2995 Online
110101 Solutions
New Discussion

Re: umask issue

 
ashok babu
New Member

umask issue

I am having two servers SERVER1 and SERVER2 with hp-ux 11.11.
If i do a telnet to each of these servers from my pc and then check the umask it showing as 022.But if i do a telnet from SERVER1 to SERVER2 or vice-versa and then check the umask it is showing as 077 and whatever files i create , it is created with a umask 0f 077. If i do a ssh between these servers it is showing the original umask of 022.
I don't understand why telnet is showing a different umask.

All suggestions will be appreciated
10 REPLIES 10
Ninad_1
Honored Contributor

Re: umask issue

Ashok,

Just to confirm, you are logging in as the same user while logging in from your pc as you are using from server1 to server2 or vice-versa ? Because the umask will be defined in /etc/profile and can be defined in the user's .profile in user's home directory. So if you are logging in as same userid then ideally you shouldnt get this problem.
Try id and pwd after logging in on both the servers - is home directory created on both servers for the user ?

Regards,
Ninad
Steven E. Protter
Exalted Contributor

Re: umask issue

Shalom,

When you telnet from one server to another your umask is normally set by /etc/profile .profile or other scripts.

ssh can be set in ssh_config or sshd_config to not read the environment on the host it connects to.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
ashok babu
New Member

Re: umask issue

Hi,
The umask is not defined in /etc/profile or $HOME/.profile .
It is defined in /sbin/rc script on both the servers
Ninad_1
Honored Contributor

Re: umask issue

Ashok,

umask is basically valid for your login - so it has to be defined somewhere in the process of logging in - and thats where /etc/profile and $HOME/.profile come into picture.
Can you try setting the following to /etc/profile or the user profile in say server1

umask 022

and then try relogging (you need to login afresh, then only the umask setting will take effect for the new login) in to server1 from server2 and see if the problem exists.

Regards,
Ninad
Kent Ostby
Honored Contributor

Re: umask issue

Ashok --

Check the /etc/inetd.conf file settings as well.


"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Kent Ostby
Honored Contributor

Re: umask issue

Oops.. skip that last note. That's only for FTP that we can mask it in /etc/inetd.conf.

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Kent Ostby
Honored Contributor

Re: umask issue

The complete list of files where this permission is general overridden:

For posix shell users:
/etc/profile $HOME/.profile /etc/skel/.profile
For c shell users:
/etc/csh.login $HOME/.login $HOME/.cshrc
For telnet user:
/etc/profile $HOME/.profile
For vue user:
$HOME/.vueprofile /usr/lib/X11/vue/Vuelogin/Xsession
/usr/vue/config/sys.vueprofile
For cde user
$HOME/.dtprofile /usr/dt/config/sys.dtprofile
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
ashok babu
New Member

Re: umask issue

Hi,
If i am specifying the umask as 022 in my .profile and then logging in using telnet,it is showing the umask as 022 only.

But wondering from where telnet is showing the umask as 077 if i am not specifying it explicitly in my .profile or /etc/profile


Muthukumar_5
Honored Contributor

Re: umask issue

Are you completed the patch update?
Are you using the same user account? telnet is not able to change the umask settings.

Is there anything in the startup script(s)? Search as,

# grep 'umask 077' /sbin/init.d/*

Some thing is strange in telnet related configuration files. Remove umask related setting in /etc/profile or $HOME/.profile files. Is there any subsidery scirpt files to do umask in that profile files.

--
Muthu
Easy to suggest when don't know about the problem!
Ninad_1
Honored Contributor

Re: umask issue

Ashok,

Is there any other .kshrc or .cshrc file in your home directory ? you can grep for umask in all the .xyz files in your home directoy.
cd $HOME
ls -al will show you all files (files starting with . are not shown without the -a option)
Then grep in these files.

As I mentioned earlier - the umask setting is valid or relevant to per login session. Are there any startup scripts for ssh ? other than /etc/profile and $HOME/.profile - then it may have been declared in those files. I do not know much on ssh.

Let know the outcome.

Regards,
Ninad