I actually discovered that the line-corruption bug was happening across all FTP clients I used. I contacted the owner of the FTP server I'm using and they're now looking into things since they're largely an "indie" company who might've setup something wrong. So you're probably right in that it's a server bug.
Also, Cyberduck has recently started having the same issues with permissions. Probably safe to assume that it's not the program at this point. The tech guy for the people I'm with is now looking into things on their side, as I said. If you've got any information on what could be causing this then I'll pass it on.
But yeah, safe o assume that this is "solved" since it's not WinSCP's fault. Cheers and sorry.
I'm sure this is server-side bug. Cyberduck may be doing the upload slightly differently, so it does not trigger the bug. I have tried to enable verbose logging in Cyberduck to check, but I did not succeed.
Anyway, can you post Debug 2-level log file from WinSCP? So that I can double check if everything goes as it should.
Apologies for the spam but I thought this'd be significant too:
Sometimes the files get uploaded and the final line of the document is edited/appended to containing the previous word in the line before it. For example, I just uploaded a .yml that had - "lounge_region" as the final line. When uploaded, I was given a .yml formatting exception because it had actually become - "lounge_region"gion".
I've had this a few times elsewhere too. I've found myself having to append comments to the bottom of the file in order to prevent extraneous, out of place text from throwing errors during the formatting process.
You're going to have to forgive me mate, I'm really unfamiliar with the Networking side of Computer Science and particularly with FTP clients in general.
Can you clarify what you mean by "What SFTP server" and the remote system? What's the exact information I can give you? And where could I find it?
A complete log file? I can close the program completely, upload a file and then send the log through if that's what you mean. I'll attach it to this reply. If you mean something else, lemme know and I'll get back to you.
I just tried Cyberduck and that works fine. Editing the file in-place and then saving it uploads it and retains its permissions. I even checked with WinSCP after editing to ensure it had retained its permissions and even WinSCP reports it as 644 rw-r-r--.
Let me know what else you need and cheers for helping.
What SFTP server and exact remote system is that? Can you post a complete log file?
Did you try another SFTP client?
I'm using SFTP, Notepad++ as an external editor, (it doesn't work with internal either) 'Set Permissions' unticked and Enable transfer resume/transfer to temporary filename for: disabled. I can explicitly set the file permissions after upload too. It's a UNIX-based remote system, I'm on Windows.
Even forcing the "Set Permissions" command to on and selecting permissions doesn't make the file have them after uploading.
Really am not sure what's going wrong here. There's no error message either.