Operating System - HP-UX
1821584 Members
3414 Online
109633 Solutions
New Discussion юеВ

File permissions problem after transfering files from Windows to HPUX via SCP & SFTP

 
SOLVED
Go to solution
amdtaufik
Occasional Advisor

File permissions problem after transfering files from Windows to HPUX via SCP & SFTP

Hi All ...

As per subject above;

The current situation:
The files was successfully transferred to HPUX machine from Windows via SCP and SFTP, but the file permissions given on HPUX was 600 -rw-------

What I want to achieve:
The successfully transferred files should have at least a 660 file permission -rw-rw---- in HPUX machine

Here are my current settings:
1. umask is now set to 007 in /etc/profile, /etc/csh.login, /etc/d.profile, /etc/d.login

2. previously the umask was set to 027

3. i'm currently using HPUX 11.23 version
4. the server is configured as trusted mode

How do I go about resolving this issue?

Your help is very much appreciated. Tqvm


5 REPLIES 5
Johnson Punniyalingam
Honored Contributor

Re: File permissions problem after transfering files from Windows to HPUX via SCP & SFTP

Hope the below link will give better understanding.

http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html
Problems are common to all, but attitude makes the difference
amdtaufik
Occasional Advisor

Re: File permissions problem after transfering files from Windows to HPUX via SCP & SFTP

Thanks for the information, but it does not really help, I think my umask setting is correct.

Any more ideas?
Patrick Wallek
Honored Contributor
Solution

Re: File permissions problem after transfering files from Windows to HPUX via SCP & SFTP

Have a look at the 'SftpUmask' parameter in the sshd_config file. On my HP-UX server the file is /etc/opt/ssh/sshd_config.

If you specify:

SftpUmask 007

in the sshd_config file and then stop and restart the SSH daemon, I think this should do what you want.

Have a look at the sshd_config man page for more details.
amdtaufik
Occasional Advisor

Re: File permissions problem after transfering files from Windows to HPUX via SCP & SFTP

Tqvm ... that really helps. Problem solve, files are now successfully transferred with the correct permissions.
amdtaufik
Occasional Advisor

Re: File permissions problem after transfering files from Windows to HPUX via SCP & SFTP

Problem resolved. Set the umask in sshd_config as per suggested above. Tqvm