On Wed, Mar 28, 2012 at 06:33:16PM +0200, Stefan Sieg wrote:
> are you overwriting existing files that have the previous file mode?
No, these are new files. Let me explain better.
When I copy a file over with sftp, the permissions of the file created
on the server, are replicated from the client.
This is in contrast, when I'm logged in on the server with that same account
and create a file, the umask is correct as per /etc/login.conf.
Even though reading sftp-server(8):
-u umask
Sets an explicit umask(2) to be applied to newly-created files
and directories, instead of the user's default mask.
I would assume that the files copied over by the client which don't exist
on the server should be honor this flag.
Are my assumptions correct?