login about faq

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.

  1. What controls the target files permissions?

  2. What can we do to get the target file to have the permission we want AUTOMATICALLY (ie NOT code chmod in the control file)?

asked Dec 14 '10 at 20:35

SSH%20KB's gravatar image


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%20-%20Tectia%20Support's gravatar image

Joe - Tectia Support ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Dec 14 '10 at 20:35

Seen: 6,910 times

Last updated: Dec 14 '10 at 20:37

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.