Hi. I'm sorry if this has already been discussed, I tried to find it in the forum, but didn't see it...
When trying to sync a folder between two Macs over SFTP, I'm running into an error when a file has been renamed only in terms of case. For example, if I have a file "foo.txt" and I change its name to "Foo.txt" and then try to sync (mirror) the local folder to the remote one, I get:
Cannot move file
"sftp://mega/Users/Lennart/Temporary/SyncTest/foo.txt" to
"sftp://mega/Users/Lennart/Temporary/SyncTest/Foo.txt".
LIBSSH2_ERROR_SFTP_PROTOCOL: SFTP Protocol Error - LIBSSH2_FX_FAILURE [libssh2_sftp_rename_ex]
If I manually run sftp(1) from the command line and rename foo.txt to Foo.txt, then everything works fine so I don't really understand what FFS is tripping up on. Other renames of completely different file names seem to work fine.
The Macs are running 10.13.6 and 10.14 beta, respectively, both with APFS file systems.
Thanks!
Error when trying to mirror filenames with case changes
- Posts: 1
- Joined: 7 Aug 2018
- Site Admin
- Posts: 7284
- Joined: 9 Dec 2007
The problem is a combined failure of both libssh2 (which FreeFileSync is using) and the macOS SFTP server: The SFTP server thinks the target file is already existing, hence "LIBSSH2_FX_FAILURE". Failing this way is nonsense of course for a mere rename in case. What probably would help however is if libssh2 passed the "LIBSSH2_SFTP_RENAME_OVERWRITE" flag. Alas, this flag requires SFTP version 5 or later, but libssh2 only supports version 3.