login about faq


While transfering files from tectia server using Java api, there is an error (102-Permission denied). Can we control permissions to a folder using tectia server?.


asked Dec 21 '11 at 07:10

nitin's gravatar image


edited Dec 26 '11 at 11:15

how are you setting the umask for the terminal sessions, are you using shell initialization files?

With sftp, it is possible to use shell initialization files to set the umask, but there are a couple of things needed for that:

  • The sftp subsystem should be started throught the user's shell (this is the default) and not directly. This means that you should not use the exec-directly option in the configuration.

  • The umask setting should be in a file that is read even by non-interactive shells. The details depend on the user's shell. If this is AIX, I am guessing that the user has ksh as the default shell. In ksh, the shell looks for variable ENV and expands that and processes that file. In bash, the variable is BASH_ENV.

For example, if the users have a $HOME/.profile file where there is the line "umask 037" and you want the users to have this in their non-interactive shells, you could create a file "/etc/environment" and put the following line there:


Another thing to notice is that umask is not the only thing that affects the permissions. The umask set the bits that are not set when new files are created. But you can have different permissions from the umask for example in the following cases: - file already exists and is rewritten - original file has less permissions (so that umask does not block them) and the sftp client is trying to preserve the permissions


answered Dec 27 '11 at 21:59

renae's gravatar image


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 21 '11 at 07:10

Seen: 7,846 times

Last updated: Dec 27 '11 at 21:59

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