sftp - permission setting check

Hello,

I am doing a transfer of a file from one HP-UX ( umask : 033 ) server to another HP-UX server ( umask : 033 ) and file got transferred sucessfully. However I could see the file permission gets changed at the receiving end. Would like to know the reason for that?

Details below:

Sending end file permission:
-rw-r--r-- <file>

Receiving end file permission:
-rw-r----- <file>

Could you please let me know how & why does this change happen? Also what exactly is the functionality of sftp with regard to file permission?

Thanks.

The umask is related to the shell, if you want sftp's umask to change, you'll need to adjust the sftpd's config (or sshd, depending on your implimentation of sftp).

Hello,

Could you please let me know the procedure to adjust the sftpd's config (or sshd, depending on your implimentation of sftp) ?

It depends on the implementation you are using, but it could be under /etc/ssh.
Find the relevant config file and locate an entry for umask.