I have a .NET program uploading a file to a SFTP server hosted in Unix.
When the file is dropped the permissions are restrictive to a Unix batch accessing it.
My elementary understanding of SFTP and SSH is that the permissions of the file being uploaded is determined by the SSH/SFTP logged in user and that users permissions on that directory (endpoint) not by the permissions of the original file which was created by the .NET program (source).
Could someone please confirm my assumptions are correct?
This depends on server implementation. Permissions can be inherited from the folder to which the file is uploaded or by the user logged in via SSH. As Windows doesn’t know anything about remote system permissions (by default), permissions are not copied. Note, that SFTP 4+ (if memory serves regarding versions) let you change permissions via SFTP, which means that the client can set permissions after the file is uploaded.