scp/sftp umask

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
Subject: scp/sftp umask
struggling a little with umask

I have a network that I want to allow off-site 'vendors' to drop and
take files from server via scp which apparently is actually sftp

I created the user exchange and have the directory for this user to use
and his umask is 002. If I create a directory or file as that user, the
permissions are indeed 775/664.

If this user logs in via WinSCP and creates a file or folder, it is
created as 755/644 and thus a member of the group cannot delete the
files or directories created by this user.

I changed /etc/sshd_config to PermitUserEnvironment Yes and put a file
in this users $HOME/.ssh/environment with the contents of umask 002 -
restarted sshd but that doesn't change the permissions of new files and
directories.

Anyone got a suggestion?

Thanks

Craig