encfs icon indicating copy to clipboard operation
encfs copied to clipboard

ERROR Invalid data size, not multiple of block size

Open syaifulnizamyahya opened this issue 4 years ago • 4 comments

I encrpt data on my nas and upload the file to google cloud. I also mount cloud storage and decrypt so i can access it like normal drive.

Recently, I get this message a lot in my unraid server. I do move files from mounted and decrypted cloud storage to another folder in the same storage recently. Is this the reason I get this message?

May 7 00:27:15 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:15 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:15 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:15 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:15 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:15 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:19 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:19 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:19 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:20 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:24 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:43 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:43 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:43 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:45 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:45 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:27:46 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:28:14 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:28:14 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:28:14 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:28:19 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:28:19 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:28:20 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size
May 7 00:28:23 Tower encfs[9162]: ERROR Invalid data size, not multiple of block size

This is the content of my .encfs6.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="13">
<cfg class_id="0" tracking_level="0" version="20">
	<version>20100713</version>
	<creator>EncFS 1.8.1</creator>
	<cipherAlg class_id="1" tracking_level="0" version="0">
		<name>ssl/blowfish</name>
		<major>3</major>
		<minor>0</minor>
	</cipherAlg>
	<nameAlg>
		<name>nameio/block</name>
		<major>4</major>
		<minor>0</minor>
	</nameAlg>
	<keySize>128</keySize>
	<blockSize>4096</blockSize>
	<uniqueIV>0</uniqueIV>
	<chainedNameIV>0</chainedNameIV>
	<externalIVChaining>0</externalIVChaining>
	<blockMACBytes>0</blockMACBytes>
	<blockMACRandBytes>0</blockMACRandBytes>
	<allowHoles>1</allowHoles>
	<encodedKeySize>28</encodedKeySize>
	<encodedKeyData>
removed
	</encodedKeyData>
	<saltLen>20</saltLen>
	<saltData>
removed
	</saltData>
	<kdfIterations>375236</kdfIterations>
	<desiredKDFDuration>500</desiredKDFDuration>
</cfg>
</boost_serialization>

This is how i call encfs echo removed | ENCFS6_CONFIG='/mnt/user/Cloud/ijm/apps/encfs/.encfs6.xml' encfs
-S -o rw -o allow_other -o uid=99 -o gid=100
/mnt/user/Cloud/ijm/ijmrclone/encfs
/mnt/user/Cloud/ijm/encfsrclone/

Does this means that I have data that is unrecoverable? What should I do?

syaifulnizamyahya avatar May 06 '20 16:05 syaifulnizamyahya

Are you using any Unraid community plugins such as parity checker? Parity checker adds a hash of the file to the files that may conflict with Encfs.

It's highly improbable that your data has changed beyond repair however, easiest way to figure it out would be replicating the error on a file you can make break (a text file) keeping the original working encrypted file, and comparing it to the broken one in a hex editor....more than likely just a couple bytes have been added to the beginning or end.

hacked2123 avatar May 08 '20 05:05 hacked2123

I also face these error messages from time to time. How can I figure out which files a affected?

btwe avatar Jul 06 '20 08:07 btwe

I also face these error messages from time to time. How can I figure out which files a affected?

) encfsctl showcruft rootdir ( change out rootdir for you location and this command should list any files that fail to decrypt using the password you provide.

hacked2123 avatar Jul 06 '20 10:07 hacked2123

Thanks :+1: In my case, the cruft only contained sync conflict files from syncthing (see #535). I moved them away. Now the encfs seems to be fine.

btwe avatar Jul 06 '20 10:07 btwe