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:
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