You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vfs: serve sftp is reporting incorrect hashes when used with --vfs-cache-mode full #4956
Using rclone serve sftp and rclone sync
In case a file has been interrupted during the transfer (like ctrl+c)
It needs 2 transfer/upload in order to 'receive' the correct file
What is your rclone version (output from rclone version)
1.53.3
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
linux amd64
Which cloud storage system are you using? (e.g. Google Drive)
local
The command you were trying to run (e.g. rclone copy /tmp remote:tmp)
Nick reproduce using :
rclone serve -vv sftp --user x --pass x --vfs-cache-mode writes /tmp/sftptest/
rclone sync -P -vv --sftp-host localhost --sftp-port 2022 --bwlimit 100k src :sftp:
A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)
ERROR : Attempt 1/3 failed with 1 errors and: corrupted on transfer: MD5 hash differ
ERROR : Attempt 2/3 succeeded
changed the title [-]rclone serve sftp needs 2 uploads to save over an existing file[/-][+]vfs: serve sftp is reporting incorrect hashes when used with --vfs-cache-mode full[/+]on Jan 25, 2021
What needs to be done here is implement a Hash() method on VFS objects which can read either from the remote object, or from the local cached copy if present.
This needs to be used in the Etag method in cmd serve webdav
Activity
[-]rclone serve sftp needs 2 uploads to save over an existing file[/-][+]vfs: serve sftp is reporting incorrect hashes when used with --vfs-cache-mode full[/+]ncw commentedon Jan 25, 2021
I reproduced this with
And
I think I see what is going on here.
You can see this is the problem if you use this on the sending command
Then it will only do 1 transfer not 2.
What needs to be done here is implement a Hash() method on VFS objects which can read either from the remote object, or from the local cached copy if present.
This needs to be used in the
Etagmethod incmd serve webdavrclone/cmd/serve/webdav/webdav.go
Line 372 in 127f48e
And in the md5sum/sha1sum commands in
cmd serve sftprclone/cmd/serve/sftp/connection.go
Line 121 in 127f48e