Using SFTP, I'm having some issues trying to set the permissions of the target file.
It appears SFTP does NOT conform to the Unix standard of using the userid UMASK values.
asked Dec 14 '10 at 20:35
SSH KB ♦
If you are transferring files, as an example, from z/OS (client) to a Unix box (server) that is running OpenSSH. In that case, the client does not use any UMASK as it is the server side that decides what the permissions will be on the newly created file. So in this case it is OpenSSH server that sets the UMASK. And it does not read ~/.ssh2/environment file.
In a case in which the Tectia client is transferring a file from Unix server to HFS, the client uses the UMASK that has been set in the shell. The client does not use environment variable UMASK to set the UMASK value. In fact, the client never sets the UMASK.
In a case in which the Tectia SFTP server, sft-server-g3, is creating file, it uses the UMASK that was set by the SSH Tectia Server before SFTP server was launched. SSH Tectia server, sshd2, uses the UMASK that was set before it is started. It does not use UMASK environment variable (in z/OS platform). There seems to be no way to change UMASK on sft-server-g3, if you cannot change UMASK before running the server startup script (/opt/tectia/etc/init.d/sshd2).
answered Dec 14 '10 at 20:37
Joe - Tectia Support ♦♦