Hashsum CRC-32 is not supported in rclone v1.51.0?

When using the hashsum CRC-32 algorithm to get the hash of the file, I get an error saying that it is not supported. Eventhough, the $rclone hashsum command give the CRC-32 as supported hash algorithm.

D:\Rclone>rclone hashsum CRC-32 remote:/tmp/archive/FULL_DESC.csv.zip --config D:\Rclone\rclone.conf --log-level DEBUG
2020/04/24 15:56:21 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "hashsum" "CRC-32" "remote:/tmp/archive/FULL_DESC.csv.zip" "--config" "D:\\Rclone\\rclone.conf" "--log-level" "DEBUG"]
2020/04/24 15:56:21 DEBUG : Using config file from "D:\\Rclone\\rclone.conf"
2020/04/24 15:56:21 DEBUG : sftp://user@XXXX:22//tmp/archive/FULL_DESC.csv.zip: New
 connection 10.XX.XX.XX:56103->10.XX.XX.XX:22 to "SSH-2.0-OpenSSH_7.4"
UNSUPPORTED  FULL_DESC.csv.zip
2020/04/24 15:56:21 Failed to hashsum: hash type not supported

D:\Rclone>rclone hashsum
Supported hashes are:
  * MD5
  * SHA-1
  * Whirlpool
  * CRC-32
  * DropboxHash
  * MailruHash
  * QuickXorHash

D:\Rclone>rclone --version
rclone v1.51.0
- os/arch: windows/amd64
- go version: go1.13.7

Im running this commands on a windows machine.

OS Name:                   Microsoft Windows Server 2012 R2 Standard
OS Version:                6.3.9600 N/A Build 9600
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Member Server
OS Build Type:             Multiprocessor Free
System Manufacturer:       VMware, Inc.
System Model:              VMware Virtual Platform
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.

Remote server is a linux machine.

Question: Why am I getting this error even though CRC-32 is actually supported in the clone version I'm using?

The remote you are using has to support the checksum as it doesn't matter the client you are running the command on.

The overview is here:

https://rclone.org/overview/

I am also seeing similar behavior. Does it mean the remote system should have Rclone installed & running there to support CRC-32?

Remote Server is a Unix machine configured as a SFTP server, FYI. Also "cksum" is anyways enabled here.

hello and welcome to the forum,

different backends support different hashes.

read this:
https://rclone.org/overview/#features
"SFTP MD5, SHA1 "

Hi There!!

Thanks for your response.

I've gone through the documentation, But I am specifically looking for CRC-32 Hashsum to be supported. What would be recommendation for this?

hi,
is there a reason you must use crc32 versus md5?

You need to use a backend that supports it. Is there a backend you are trying to use that with?

The sftp backend uses the md5sum and the sha1sum binaries to support MD5 and SHA1. It would be possible to get it to support CRC-32 if there was a binary to support it.

From a quick test the cksum doesn't appear to be a CRC-32 - there are lots of different CRC routines alas.

$ rclone hashsum CRC-32 /tmp/src/file2\ shortcut\ copy\ 2.txt 
363a3020  file2 shortcut copy 2.txt
$ cksum /tmp/src/file2\ shortcut\ copy\ 2.txt 
3015617425 6 /tmp/src/file2 shortcut copy 2.txt
>>> 0x363a3020
909783072

If the remote server has rclone installed then you can run rclone hashsum on it.

I guess rclone could use itself as a hashing routine too over sftp - I hasn't thought of that - so instead of using the md5sum binary it could use rclone hashsum MD5...

Is there any particular reason you have to use CRC-32 - it is quite a weak checksum compared to MD5 for example. 3 bits of error can defeat CRC-32 IIRC.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.