Bad size for decrypt: file is too short to be encrypted?

What is the problem you are having with rclone?

Rclone reports

Run the command 'rclone version' and share the full output of the command.

rclone v1.59.2
- os/version: debian 11.5 (64 bit)
- os/kernel: 5.15.39-4-pve (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.6
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

S3 compatible - iDrive E2

The command you were trying to run (eg rclone copy /tmp remote:tmp)

/usr/local/bin/rclone --config /etc/rclone.conf sync /srv/clones/pbs E2_Encrypted:/ --transfers=32 --fast-list --stats-log-level NOTICE --stats 30m --max-delete 5000 -vv 2>&1 

The rclone config contents with secrets removed.

[E2]
type = s3
provider = IDrive
access_key_id = <redacted>
secret_access_key = <redacted>
endpoint = l0n6.fra.idrivee2-27.com
server_side_encryption = aws:kms
bucket_acl = private
no_check_bucket = true

[E2_Encrypted]
type = crypt
password = <redacted>
remote = E2:nas-backup-pbs
transfers = 16

A log from the command with the -vv flag

I am not sure if this output is about the remote or the local source.

2022/09/16 07:27:06 DEBUG : .chunks/748d/748d3e5f0ccaa0aaffd3e83f6f769009ca78bc77b66c35cfe520ca525766e112: Bad size for decrypt: file is too short to be encrypted
2022/09/16 07:27:06 DEBUG : .chunks/d50d/d50d1cc48b10bdea6dc1962c98bbcb516af6e4456161ac6bc34c2ce672bb6bd0: Bad size for decrypt: file is too short to be encrypted
2022/09/16 07:27:06 DEBUG : .chunks/b83e/b83ef12bf5dd3d932c084a21e17d0ce9525179d4854baa4064a414caca726a29: Bad size for decrypt: file is too short to be encrypted
2022/09/16 07:27:07 DEBUG : .chunks/457c/457c7a280ec362f223c6156f2fda89a1c732de8b34eaa9ec45cbbf41d68f75ee: Bad size for decrypt: file has truncated block header
2022/09/16 07:27:08 DEBUG : .chunks/223c/223cddfa84efb24e150f8a1667e9b44e9155ab3116b0215e48cb40e1842924f0: Bad size for decrypt: file is too short to be encrypted
2022/09/16 07:27:09 DEBUG : .chunks/22ed/22ede492aa004122898fe61c157ee48d8a317c3a4148540b8c3c91a868f57720: Bad size for decrypt: file has truncated block header

These files are present on the local filesystem:

ls -l .chunks/748d/748d3e5f0ccaa0aaffd3e83f6f769009ca78bc77b66c35cfe520ca525766e112
-rw-rw-r-- 1 backup backup 1309740 Feb 27  2022 .chunks/748d/748d3e5f0ccaa0aaffd3e83f6f769009ca78bc77b66c35cfe520ca525766e112
root@cube:/srv/clones/backups/pbs# ls -l .chunks/d50d/d50d1cc48b10bdea6dc1962c98bbcb516af6e4456161ac6bc34c2ce672bb6bd0
-rw-rw-r-- 1 backup backup 4191220 Dec 23  2021 .chunks/d50d/d50d1cc48b10bdea6dc1962c98bbcb516af6e4456161ac6bc34c2ce672bb6bd0
...

I would think that this file size would not be 'too short to encrypt'?

That does seem a bit strange as I haven't seen that before. If the file wasn't crypted it generally produces a different message.

@ncw - any thoughts on this one?

This means that the encrypted file is shorter than the crypt header (20 bytes).

So I'd say the file has got truncated on the remote somehow.

You can use this to tell you what the encrypted name is

rclone backend encode E2_Encrypted: .chunks/748d/748d3e5f0ccaa0aaffd3e83f6f769009ca78bc77b66c35cfe520ca525766e112

then investigate it with this to see how big rclone thinks it is

rclone lsl E2:nas-backup-pbs/whatever/the/above/printed

Oddly enough, I get nothing back from the backend.

$ rclone backend encode E2_Encrypted: /foo/.chunks/748d/748d3e5f0ccaa0aaffd3e83f6f769009ca78bc77b66c35cfe520ca525766e112
/g6tc8qvpail5j0ucp1ftleqkco/u5ovfsrbe11mikf87frh3kuno4/mi8je4f6spj2b0s5lg0tp9at1s/v4a05436aduk8svsds7i4jfps4/p1nnceehfedod8rn7sup5k4glk/m5c1ifbkm7b00l491h67tf1mbk/um93eqfiq35oubgq71rlaplr8fbh65ppbtcjglh3bdocoo1vl007c8pc1d63h6vjhn8ie0ev3a2jupht0r0ekskf7m514se5jku86pujajn6idvgi8km2j62jhhjb44d

$ rclone lsl E2:nas-backup-pbs/g6tc8qvpail5j0ucp1ftleqkco/u5ovfsrbe11mikf87frh3kuno4/mi8je4f6spj2b0s5lg0tp9at1s/v4a05436aduk8svsds7i4jfps4/p1nnceehfedod8rn7sup5k4glk/m5c1ifbkm7b00l491h67tf1mbk/um93eqfiq35oubgq71rlaplr8fbh65ppbtcjglh3bdocoo1vl007c8pc1d63h6vjhn8ie0ev3a2jupht0r0ekskf7m514se5jku86pujajn6idvgi8km2j62jhhjb44d
$

I think you want to remove the /foo from your first command

rclone backend encode E2_Encrypted: .chunks/748d/748d3e5f0ccaa0aaffd3e83f6f769009ca78bc77b66c35cfe520ca525766e112

/g6tc8qvpail5j0ucp1ftleqkco/u5ovfsrbe11mikf87frh3kuno4/mi8je4f6spj2b0s5lg0tp9at1s/v4a05436aduk8svsds7i4jfps4/p1nnceehfedod8rn7sup5k4glk/m5c1ifbkm7b

If that still doesn't work try looking from the directories or file in the output - they will be there somewhere

Ok, that was dumb of me.

$ rclone lsl E2:nas-backup-pbs/p1nnceehfedod8rn7sup5k4glk/m5c1ifbkm7b00l491h67tf1mbk/um93eqfiq35oubgq71rlaplr8fbh65ppbtcjglh3bdocoo1vl007c8pc1d63h6vjhn8ie0ev3a2jupht0r0ekskf7m514se5jku86pujajn6idvgi8km2j62jhhjb44d
  1310092 2022-02-28 03:26:57.000000000 um93eqfiq35oubgq71rlaplr8fbh65ppbtcjglh3bdocoo1vl007c8pc1d63h6vjhn8ie0ev3a2jupht0r0ekskf7m514se5jku86pujajn6idvgi8km2j62jhhjb44d

1310092 bytes doesn't look truncated.

Is this problem intermittent?

Can you download that one file encrypted? How about decrypted?

Seems to have been a spurious thing, hasn't happened since. I really have no clue why though.

@ncw I could download the file fine. Perhaps something went wrong at some point with the transfer?

Maybe a network problem...

If we can't reproduce we'll have to leave it. Let us know if you can reproduce it .

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