core icon indicating copy to clipboard operation
core copied to clipboard

Fatal webdav: Encryption not ready

Open binarykitchen opened this issue 11 years ago • 18 comments

Steps to reproduce

Go to owncloud admin and check the log.

(also, you can reproduce when you attempt to open any file you have uploaded - all fail to open)

Expected behaviour

There are no log entries and I can open the uploaded files.

Actual behaviour

Here is the error that appears thousand times in the log:

Exception: {"Message":"HTTP/1.1 503 Encryption not ready: multikeydecrypt with share key failed:error:0407106B:rsa routines:RSA_padding_check_PKCS1_type_2:block type is not 02","Code":0,"Trace":"
#0 /var/www/owncloud/lib/private/connector/sabre/file.php(152): OC\Connector\Sabre\File->convertToSabreException(Object(OCA\Encryption\Exceptions\MultiKeyDecryptException))
#1 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(1087): OC\Connector\Sabre\File->put(Resource id #31)
#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(501): Sabre\DAV\Server->updateFile('M1/home/michael...', Resource id #31, NULL)
#3 [internal function]: Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#4 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:PUT', Array)
#6 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#7 /var/www/owncloud/apps/files/appinfo/remote.php(83): Sabre\DAV\Server->exec()
#8 /var/www/owncloud/remote.php(132): require_once('/var/www/ownclo...')
#9 {main}","File":"/var/www/owncloud/lib/private/connector/sabre/file.php","Line":454} 

Maybe it says something?

Server configuration

$   
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:        14.04
Codename:       trusty
$ uname -a      
Linux binarykitchen.com 3.12.27-xenU #1 SMP Thu Aug 28 23:13:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Web server:

$ nginx -v
nginx version: nginx/1.8.0

Database:

$ mysql --version
mysql  Ver 14.14 Distrib 5.5.43, for debian-linux-gnu (x86_64) using readline 6.3

PHP version:

$ php -v
PHP 5.5.27-1+deb.sury.org~trusty+1 (cli) (built: Jul 15 2015 12:14:44) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

ownCloud version: ownCloud 8.1.1.3 (stable)

Updated from an older ownCloud or fresh install: Fresh install via apt-get

$ sudo -u www-data php ./occ app:list                                                                                                                                                                      
Enabled:
 - activity: 2.0.1
 - bookmarks: 0.4
 - calendar: 0.7.2
 - contacts: 0.4.0.0
 - documents: 0.10.1
 - encryption: 1.0.0
 - external: 1.2
 - files: 1.1.10
 - files_locking: 
 - files_pdfviewer: 0.7
 - files_sharing: 0.6.2
 - files_texteditor: 0.4
 - files_versions: 1.0.6
 - files_videoviewer: 0.1.3
 - galleryplus: 13.0.0
 - mozilla_sync: 1.4
 - provisioning_api: 0.2
 - tasks: 0.7.1
 - templateeditor: 0.1
 - videos: 1.0
Disabled:
 - files_external
 - files_trashbin
 - firstrunwizard
 - gallery
 - user_external
 - user_ldap
 - user_webdavauth

The content of config/config.php: (Without sensitive data)

 <?php
$CONFIG = array (
  'instanceid' => 'oc02ca513338',
  'passwordsalt' => 'xxx',
  'datadirectory' => '/var/www/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '8.1.1.3',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'xxx',
  'installed' => true,
  'forcessl' => true,
  'loglevel' => 1,
  'logfile' => '/var/log/owncloud.log',
  'theme' => '',
  'maintenance' => false,
  'memcache.local' => '\OC\Memcache\APCu',
  'trusted_domains' => 
  array (
    0 => 'xxx',
  ),
  'mail_smtpmode' => 'smtp',
  'secret' => 'xxx',
  'forceSSLforSubdomains' => true,
  'mail_smtpsecure' => 'tls',
  'mail_smtphost' => '127.0.0.1',
  'mail_smtpport' => 'xxx',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xxx',
  'mail_smtpauthtype' => 'PLAIN',
);

Are you using external storage, if yes which one: None

Client configuration

Browser: Firefox 40

Operating system: Ubuntu 15.04

Logs

Web server error log

N/A

ownCloud log (data/owncloud.log)

N/A

binarykitchen avatar Sep 02 '15 21:09 binarykitchen

@schiesbn

karlitschek avatar Sep 02 '15 21:09 karlitschek

@karlitschek @schiesbn ping??

binarykitchen avatar Sep 15 '15 11:09 binarykitchen

@binarykitchen does this happens with webdav only? Can you download the same file with the web interface?

schiessle avatar Sep 15 '15 13:09 schiessle

@schiesbn happens with webdav only - these log entries happen only for webdav.

when i download the same file over the web interface, i cannot open them but there are no log entries for that. lots of my files cannot be opened anymore since i migrated from v7 to v8, refer to https://github.com/owncloud/core/issues/18407

binarykitchen avatar Sep 15 '15 21:09 binarykitchen

on v8.1.3 I see a slightly different fatal error:

Exception: {"Message":"HTTP/1.1 503 Encryption not ready: multikeydecrypt with share key failed:error:04065072:rsa routines:RSA_EAY_PRIVATE_DECRYPT:padding check failed","Code":0,"Trace":"
#0 /var/www/owncloud/lib/private/connector/sabre/file.php(152): OC\Connector\Sabre\File->convertToSabreException(Object(OCA\Encryption\Exceptions\MultiKeyDecryptException))
#1 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(1087): OC\Connector\Sabre\File->put(Resource id #31)
#2 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(501): Sabre\DAV\Server->updateFile('M1/home/michael...', Resource id #31, NULL)
#3 [internal function]: Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#4 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:PUT', Array)
#6 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#7 /var/www/owncloud/apps/files/appinfo/remote.php(83): Sabre\DAV\Server->exec()
#8 /var/www/owncloud/remote.php(132): require_once('/var/www/ownclo...')
#9 {main}","File":"/var/www/owncloud/lib/private/connector/sabre/file.php","Line":454} 

binarykitchen avatar Sep 16 '15 22:09 binarykitchen

What was your exact upgrade path? Did you upgraded from 7.0.x to 8.0.y to 8.1.z or did your upgraded from 7.0.x directly to 8.1.z? Only the first one works. It is not allowed to skip versions.

schiessle avatar Sep 28 '15 13:09 schiessle

I upgraded from 7.x to 8.0.y @schiesbn

binarykitchen avatar Sep 28 '15 20:09 binarykitchen

Same problem here, I've upgraded from 8.1.x stable to 8.2.x - this happens only from new windows machine where I've set the account. Before migration on my linux machine, everything is working just fine, but newly installed OC client on windows is giving me the exact error.

Error is showing only for specific files, so about 78-80% is synced.

mSys-mislav avatar Dec 04 '15 08:12 mSys-mislav

@mislav-eu Same error here. Upgraded 8.0.4 to 8.1.4 to 8.2.1 this morning and after creating a file via Ownnote in web-gui my server throws this exception when my client tries to download this file.

Windows-Client: Version 2.1.0 (build 5683).

{"reqId":"mqPgKpHrgvQYlAm/DubJ","remoteAddr":"x.x.x.x","app":"webdav","message":"Exception: {"Message":"HTTP/1.1 503 Encryption not ready: multikeydecrypt with share key failed:error:0407106B:rsa routines:RSA_padding_check_PKCS1_type_2:block type is not 02","Exception":"Sabre\DAV\Exception\ServiceUnavailable","Code":0,"Trace":"#0 

However download via web-GUI works fine!

js94x avatar Dec 22 '15 15:12 js94x

Our instance has been updated to 8.2.5 and the problem still occurs with different users.

Any ideas?

js94x avatar Jun 02 '16 14:06 js94x

I have the issue after upgrading from 8.x to 9.x

Tr4sK avatar Jul 21 '16 18:07 Tr4sK

Same issue from 9.0 to 9.1

macskay avatar Jul 26 '16 15:07 macskay

I notice that I have the same problem in 8.2.1 and tried to fix upgrading from 8.2.1 to 8.2.7, without success.

{"reqId":"V6IJ@ka0j19N2lxQNy@SfgAAAAY","remoteAddr":"10.1.10.210","app":"webdav","message":"Exception: {"Message":"HTTP/1.1 503 Encryption not ready: multikeydecrypt with share key failed:error:0407106B:rsa routines:RSA_padding_check_PKCS1_type_2:block type is not 02","Exception":"Sabre\DAV\Exception\ServiceUnavailable","Code":0,"Trace":"
#0 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(82): OC\Connector\Sabre\File->get()
#1 [internal function]: Sabre\DAV\CorePlugin->httpGet(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#2 /var/www/html/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#3 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(469): Sabre\Event\EventEmitter->emit('method:GET', Array)
#4 /var/www/html/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#5 /var/www/html/owncloud/apps/files/appinfo/remote.php(56): Sabre\DAV\Server->exec()
#6 /var/www/html/owncloud/remote.php(137): require_once('/var/www/html/o...')
#7 {main}","File":"/var/www/html/owncloud/lib/private/connector/sabre/file.php","Line":293}","level":4,"time":"2016-08-03T15:12:58+00:00"}

@PVince81 @DeepDiver1975 Cloud you help me here?

cdamken avatar Aug 04 '16 11:08 cdamken

What openssl version do you have ? It might require upgrading.

My own server has the following and works fine with encryption:

  • php5-5.6.1-69.1.x86_64
  • openssl-1.0.1k-2.36.1.x86_64
  • owncloud-9.1.0-1.1.noarch

I saw some stack overflow posts about this error message but they weren't helpful.

PVince81 avatar Aug 08 '16 10:08 PVince81

Any feedback about openssl versions ?

PVince81 avatar Jan 13 '17 15:01 PVince81

OpenSSL 1.0.1e-fips 11 Feb 2013 Exception: {"Message":"HTTP/1.1 503 Encryption not ready: multikeydecrypt with share key failed:error:04065072:rsa routines:RSA_EAY_PRIVATE_DECRYPT:padding check failed","Exception":"Sabre\DAV\Exception\ServiceUnavailable","Code":0,"Trace":"#0 /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(83): OCA\DAV\Connector\Sabre\File->get()\n#1 [internal function]: Sabre\DAV\CorePlugin->httpGet(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#2 /var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php(459): Sabre\Event\EventEmitter->emit('method:GET', Array)\n#4 /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#5 /var/www/html/apps/dav/appinfo/v1/webdav.php(56): Sabre\DAV\Server->exec()\n#6 /var/www/html/remote.php(164): require_once('/var/www/html/a...')\n#7 {main}","File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":311,"User":"private"}

lueurxax avatar Feb 08 '17 12:02 lueurxax

Please try again with a more recent version.

There is however one known issue that is reproducible, it's this one: https://github.com/owncloud/core/issues/26942

Basically if you share a folder while something is being uploaded into it, that something won't receive proper share keys. This could explain many of the weird encryption errors people are seeing.

Please check whether your scenario matches that. Check whether share keys exist for the file that is showing errors. If the key is missing, goto https://github.com/owncloud/core/issues/26942

PVince81 avatar Apr 07 '17 16:04 PVince81

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Aug 02 '19 16:08 lock[bot]