I have a local account set up on a server and when I sftp files to that account the permissions are maintained from the original file. However I would like to over ride those permissions and set a umask on the target server so if the original file has 644 I need them to be 664 on the target server. I can't issue a "chmod" or run a script on the target server afterwards etc.
This works today if I use plain ftp and set a umask in the users .profile on the target. But we are being forced to switch to sftp instead and now I'm running into permission issues as ssh just keeps the same permissions on the original file which I have no control over.