I have recently downloaded WinSCP version 4.2.5 to try it out doing an SFTP, and I'm having a strange issue. The target of my file (which is a server I have no access to) has a process running that immediately grabs the file when I upload it and renames it with a different name. However, when my SFTP upload is done, they have the full file and have renamed it to a new name, but there is also another file in the directory with the same name as the file I was just sending with size 0 bytes. This file is not owned by my user and I cannot overwrite it, so I can't send my file again after that until they remove that zero byte file.
For example, my file is "A.txt". Once I finish uploading "A.txt", the server side picks up "A.txt" and renames it to "A123.txt". So a directory listing should just show "A123.txt". But along with "A123.txt" (which is the exact same size as my local file), there is also a zero byte "A.txt" file.
Originally I thought it might have something to do with setting the permissions. I thought that, since the SSH_FXP_SETSTAT command is being sent after the SSH_FXP_CLOSE command, that maybe the server was creating a new, blank file to set the attributes on if the process on the server was grabbing it before the SSH_FXP_SETSTAT command got to the server. However, I turned off all permission changes (and the log file now reflects that no SSH_FXP_SETSTAT command is being sent) and I'm still getting the blank file.
Also, I am limited with my login to one particular filename ("A.txt" for this example). If I try to upload a file with a different name, the server should prevent me. And it does, sort of. If I try to send "B.txt", I get a permission denied error, but I still get a zero byte "B.txt" file on the server.
I should point out that, if I use VShell (from VanDyke software) or Robo-FTP to send this file, I do not have this problem. The server is a Tumbleweed server, version 4.7.
Does anyone have any clues at all as to what would cause this issue?