downloading large files with encryption

Hello.

I’ve got a problem with downloading larger files.

Raspbian GNU/Linux 10 (buster)
owncloud 10.6.0.5
PHP 7.3.19-1~deb10u1
MariaDB 10.3.27-MariaDB-0+deb10u1
Apache/2.4.38 (Raspbian)

Uploading large files is no problem. When I download a large file, the download stops at 2GB.

I follow the instruction on this link:

I have verified in the owncloud.log the line when owncloud broken the download. The message is:
“message”:“Exception: Bad Signature:”

I have enabled the owncloud server the default encryption module.

{“reqId”:“PXwPGXqm1lAq8nsUAcCQ”,“level”:0,“time”:“2021-01-11T16:44:15+00:00”,“remoteAddr”:“10.0.0.10”,“user”:“owncloud”,“app”:“OC\Authentication\Token\DefaultTokenProvider::updateTokenActivity”,“method”:“GET”,“url”:"/ocs/v2.php/apps/notifications/api/v1/notifications?format=json",“message”:“updating activity of token 10206 to 1610383455”}
{“reqId”:“a0fd22aa-8cbc-40fd-9291-374c8685afa9”,“level”:0,“time”:“2021-01-11T16:44:31+00:00”,“remoteAddr”:“10.0.0.10”,“user”:“owncloud”,“app”:“OC\Authentication\Token\DefaultTokenProvider::updateToken”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/owncloud/",“message”:“updating token 10217, last check is now 1610382631”}
{“reqId”:“a0fd22aa-8cbc-40fd-9291-374c8685afa9”,“level”:0,“time”:“2021-01-11T16:44:31+00:00”,“remoteAddr”:“10.0.0.10”,“user”:“owncloud”,“app”:“OC\Authentication\Token\DefaultTokenProvider::getToken”,“method”:“PROPFIND”,“url”:"/remote.php/dav/files/owncloud/",“message”:“token 7364565f288f4333743c732b627f05fd9fc80ed122c8d47e497598adb79daee3a848ed7308a22cffde4080d831c5e7b77b6c87008fb3f55c9ace0fe79ee635b6 does not exist”}
{“reqId”:“XdLjDLTh61JbUgH7gOsb”,“level”:0,“time”:“2021-01-11T16:44:54+00:00”,“remoteAddr”:“10.0.0.10”,“user”:“owncloud”,“app”:“OC\User\Session::validateToken”,“method”:“GET”,“url”:"/ocs/v2.php/apps/notifications/api/v1/notifications?format=json",“message”:“token 18c643f5366c4c47b607d42598942c3a4b885234e9d6b2aea743a5b80beae4ff968a9086afffe58c6cc481c3babee37eb8887fa88a7f3a84f0763fa29ac085f3 with token id 10206 found, validating”}
{“reqId”:“zdPiNji8wNQIVrDjnO3N”,“level”:4,“time”:“2021-01-11T16:44:54+00:00”,“remoteAddr”:“10.0.0.10”,“user”:“owncloud”,“app”:“webdav”,“method”:“GET”,“url”:"/remote.php/webdav/Download/SLE-15-SP2-Full-x86_64-GM-Media1.iso?downloadStartSecret=ysqrzf3rk0p",“message”:“Exception: Bad Signature: {“Exception”:“OC\\HintException”,“Message”:“Bad Signature”,“Code”:0,“Trace”:”#0 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/apps\/encryption\/lib\/Crypto\/Crypt.php(457): OCA\\Encryption\\Crypto\\Crypt->checkSignature(‘z+9JhbFYBoRFPlL…’, ‘o5\\xE7\\xEC#p\\xCCI\/\\x04\\xB5\\x85\\xFD\\x8E\\x94…’, ‘432f7fb575f775d…’)\n#1 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/apps\/encryption\/lib\/Crypto\/Encryption.php(362): OCA\\Encryption\\Crypto\\Crypt->symmetricDecryptFileContent(‘z+9JhbFYBoRFPlL…’, ‘o5\\xE7\\xEC#p\\xCCI\/\\x04\\xB5\\x85\\xFD\\x8E\\x94…’, ‘AES-256-CTR’, 1, 353669)\n#2 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/lib\/private\/Files\/Stream\/Encryption.php(473): OCA\\Encryption\\Crypto\\Encryption->decrypt(*** sensitive parameters replaced ***)\n#3 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/lib\/private\/Files\/Stream\/Encryption.php(289): OC\\Files\\Stream\\Encryption->readCache()\n#4 [internal function]: OC\\Files\\Stream\\Encryption->stream_read(5480)\n#5 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/Wrapper.php(55): fread(Resource id #46, 8192)\n#6 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/CallbackWrapper.php(96): Icewind\\Streams\\Wrapper->stream_read(8192)\n#7 [internal function]: Icewind\\Streams\\CallbackWrapper->stream_read(8192)\n#8 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/lib\/composer\/sabre\/http\/lib\/Sapi.php(125): fread(Resource id #49, 8192)\n#9 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(490): Sabre\\HTTP\\Sapi::sendResponse(Object(Sabre\\HTTP\\Response))\n#10 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(253): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#11 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(321): Sabre\\DAV\\Server->start()\n#12 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/apps\/dav\/appinfo\/v1\/webdav.php(66): Sabre\\DAV\\Server->exec()\n#13 \/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/remote.php(165): require_once(’\/var\/www\/cloud…’)\n#14 {main}",“File”:"\/var\/www\/cloud.testowncloud.it\/public_html\/owncloud\/apps\/encryption\/lib\/Crypto\/Crypt.php",“Line”:477}"}
{“reqId”:“zdPiNji8wNQIVrDjnO3N”,“level”:3,“time”:“2021-01-11T16:44:54+00:00”,“remoteAddr”:“10.0.0.10”,“user”:“owncloud”,“app”:“PHP”,“method”:“GET”,“url”:"/remote.php/webdav/Download/SLE-15-SP2-Full-x86_64-GM-Media1.iso?downloadStartSecret=ysqrzf3rk0p",“message”:“Cannot modify header information - headers already sent by (output started at /var/www/cloud.testowncloud.it/public_html/owncloud/lib/composer/sabre/http/lib/Sapi.php:125) at /var/www/cloud.testowncloud.it/public_html/owncloud/apps/dav/lib/Connector/Sabre/FilesPlugin.php#451”}
{“reqId”:“zdPiNji8wNQIVrDjnO3N”,“level”:3,“time”:“2021-01-11T16:44:54+00:00”,“remoteAddr”:“10.0.0.10”,“user”:“owncloud”,“app”:“PHP”,“method”:“GET”,“url”:"/remote.php/webdav/Download/SLE-15-SP2-Full-x86_64-GM-Media1.iso?downloadStartSecret=ysqrzf3rk0p",“message”:“Cannot modify header information - headers already sent by (output started at /var/www/cloud.testowncloud.it/public_html/owncloud/lib/composer/sabre/http/lib/Sapi.php:125) at /var/www/cloud.testowncloud.it/public_html/owncloud/lib/composer/sabre/http/lib/Sapi.php#66”}

Any ideas?

Thanks a lot for your answers!

Regards,
Mirko

Hi Mirko,

can you try this command:

occ encryption:fix-encrypted-version

here is our doc on this:

Best Regards

Dmitry

1 Like