Operating System - Tru64 Unix
1753477 Members
4621 Online
108794 Solutions
New Discussion

Re: Tru64 SSH2 umask problemٍٍ

 
SOLVED
Go to solution
Osama Ahmed
Advisor

Tru64 SSH2 umask problemٍٍ

Hi,
I have a TruCluster system (5.1B PK5)where files uploaded to using sftp. The file uploaded did not get the umask value of the user account used to upload the files. The uploaded files always takes
permissions 600 !! It looks like a limitation to the SSH2 Server on the Tru64 machine.

Anyone had any experience with SSH2, any work arounds there to solve this problem ?

We can't use OpenSSH as some Cluster utilities/Advfs Utilities did not work with OpenSSH.

Please Help
13 REPLIES 13
Ivan Ferreira
Honored Contributor

Re: Tru64 SSH2 umask problemٍٍ

If sftp is enabled, probably you can use scp. Using scp -p may help.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Osama Ahmed
Advisor

Re: Tru64 SSH2 umask problemٍٍ

Ivan,
I can't control the upload process as another company. They just use sftp.

My question:
- Is sftp login make use of the user profile ? i.e: Can I execute a shell script in user profile upon login to change the ownership ?

Thanks
Ivan Ferreira
Honored Contributor

Re: Tru64 SSH2 umask problemٍٍ

No, you cant. The sftp command is does not have too many options. I suggested scp because normally, ssh, scp ans sftp are available if you open port 22 on the firewall.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Vladimir Fabecic
Honored Contributor

Re: Tru64 SSH2 umask problemٍٍ

Hello
Are you using advanced security?
In that case default umask should be 077, I think.
In vino veritas, in VMS cluster
Ann Majeske
Honored Contributor

Re: Tru64 SSH2 umask problemٍٍ

Why don't you just create a script to change the file permissions the way you want and set it to run periodically from cron?
Osama Ahmed
Advisor

Re: Tru64 SSH2 umask problemٍٍ

The uploaded files got picked by a running process.

The smallest period cron can handle is every min, and the running process can try to pick the file while the cron is just waiting to be executed next min.

This will make the process miss the file because of its permissions.

I am using enhanced security. Is SSH use the default umask of enhanced security ? If yes, Can I change the default umask of enhanced securty, to let SSH use it and solve my problem ?

Thanks


Vladimir Fabecic
Honored Contributor

Re: Tru64 SSH2 umask problemٍٍ

Osama
sftp does not execute /etc/profile (where umask is defined). Your problem is caused by advanced security, not SSH2.
I think that only workaround would some script that runs in background.
Maybe someone has better idea.
Regards
In vino veritas, in VMS cluster
Osama Ahmed
Advisor

Re: Tru64 SSH2 umask problemٍٍ

Vladimir,
thanks a lot. My question now is:

- Is there anyway one can change default umask of enhanced security ? If so, How ?

Vladimir Fabecic
Honored Contributor
Solution

Re: Tru64 SSH2 umask problemٍٍ