Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External storage: DAV broken on master against other ownCloud #22605

Closed
LukasReschke opened this issue Feb 23, 2016 · 9 comments · Fixed by #22636
Closed

External storage: DAV broken on master against other ownCloud #22605

LukasReschke opened this issue Feb 23, 2016 · 9 comments · Fixed by #22636

Comments

@LukasReschke
Copy link
Member

Steps to reproduce

  1. Mount an external DAV storage as normal user. I mounted another ownCloud running 8.2.2 from my master instance
  2. Try to upload or edit files

Expected behaviour

Files should be edited or uploaded.

Actual behaviour

No modification happens. Errors are thrown on remote server. Browser shows:

Error uploading file "AkIv6N3tTqWPVneGschn5hN46rr8jKfzf0COBgiv5YLL.jpg": Client error response [url] https://cloud.smartworksg.ch/remote.php/webdav/AkIv6N3tTqWPVneGschn5hN46rr8jKfzf0COBgiv5YLL.jpg [status code] 404 [reason phrase] Not Found

ownCloud log from remote server

{"reqId":"PpM\/lZ04sQPHpnwebdhc","remoteAddr":"10.0.0.2","app":"PHP","message":"Undefined index: mtime at \/var\/www\/lib\/private\/files\/fileinfo.php#163","level":3,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"PpM\/lZ04sQPHpnwebdhc","remoteAddr":"10.0.0.2","app":"PHP","message":"Undefined index: etag at \/var\/www\/lib\/private\/files\/fileinfo.php#149","level":3,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"PpM\/lZ04sQPHpnwebdhc","remoteAddr":"10.0.0.2","app":"PHP","message":"Undefined index: mimetype at \/var\/www\/lib\/private\/files\/fileinfo.php#128","level":3,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"PpM\/lZ04sQPHpnwebdhc","remoteAddr":"10.0.0.2","app":"PHP","message":"Undefined index: permissions at \/var\/www\/lib\/private\/files\/fileinfo.php#177","level":3,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"PpM\/lZ04sQPHpnwebdhc","remoteAddr":"10.0.0.2","app":"PHP","message":"Undefined index: permissions at \/var\/www\/lib\/private\/files\/fileinfo.php#177","level":3,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"PpM\/lZ04sQPHpnwebdhc","remoteAddr":"10.0.0.2","app":"PHP","message":"Undefined index: permissions at \/var\/www\/lib\/private\/files\/fileinfo.php#177","level":3,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"PpM\/lZ04sQPHpnwebdhc","remoteAddr":"10.0.0.2","app":"PHP","message":"Undefined index: permissions at \/var\/www\/lib\/private\/files\/fileinfo.php#177","level":3,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"TlvnLmM7TdbxKyAMqAmr","remoteAddr":"10.0.0.2","app":"PHP","message":"fopen(\/var\/www\/data\/test\/files\/asdfasfd.txt.ocTransferId1397973848.part): failed to open stream: No such file or directory at \/var\/www\/lib\/private\/files\/storage\/local.php#247","level":3,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"TlvnLmM7TdbxKyAMqAmr","remoteAddr":"10.0.0.2","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Could not open file\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(82): OC\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/var\\\/www\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/var\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(469): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/apps\\\/files\\\/appinfo\\\/remote.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/remote.php(137): require_once('\\\/var\\\/www\\\/apps\\\/f...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/lib\\\/private\\\/connector\\\/sabre\\\/file.php\",\"Line\":268}","level":4,"time":"2016-02-23T17:48:08+00:00"}
{"reqId":"XuiemBRDxjoEVWQmdioa","remoteAddr":"10.0.0.2","app":"PHP","message":"fopen(\/var\/www\/data\/test\/files\/asdfasfd.txt.ocTransferId1397973848.part): failed to open stream: No such file or directory at \/var\/www\/lib\/private\/files\/storage\/local.php#247","level":3,"time":"2016-02-23T17:48:09+00:00"}
{"reqId":"XuiemBRDxjoEVWQmdioa","remoteAddr":"10.0.0.2","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Could not open file\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(82): OC\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/var\\\/www\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/var\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(469): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/apps\\\/files\\\/appinfo\\\/remote.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/remote.php(137): require_once('\\\/var\\\/www\\\/apps\\\/f...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/lib\\\/private\\\/connector\\\/sabre\\\/file.php\",\"Line\":268}","level":4,"time":"2016-02-23T17:48:09+00:00"}
@LukasReschke LukasReschke changed the title External storage: DAV broken on master External storage: DAV broken on master against other ownCloud Feb 23, 2016
@LukasReschke
Copy link
Member Author

Strangely. Server to server shares to actually work properly. Only DAV mounts complain… mhm…

@LukasReschke
Copy link
Member Author

But it also fails also similar when mounting an "ownCloud" external storage. 🙈

@LukasReschke
Copy link
Member Author

I'll try to bisect the breaking change.

@PVince81
Copy link
Contributor

I see you used https, could be related to #22016

@PVince81 PVince81 added this to the 9.0-current milestone Feb 23, 2016
@LukasReschke
Copy link
Member Author

I see you used https, could be related to #22016

Using HTTPS here but the connection itself works fine. I can open files etc.

So I guess that's another issue.

@LukasReschke
Copy link
Member Author

After fighting with external storage for a while:

a1898dc2bf9a89def29c1437903e560609f0cf40 is the first bad commit
commit a1898dc2bf9a89def29c1437903e560609f0cf40
Author: Robin Appelman <icewind@owncloud.com>
Date:   Mon Nov 2 13:13:06 2015 +0100

    db config backend for files_external

:040000 040000 d820d04a55b451ff5c9d83aadac427e3887d09e5 80cfc3bcf4cd5dfd78a1fe901053ec51d6a9ae4b M  apps

@LukasReschke
Copy link
Member Author

Confirmed.

When checking out 98bb837 the mounts do work fine, if I take @icewind1991's a1898dc the mount is broken.

@LukasReschke
Copy link
Member Author

Ok… I have a fix for the SSL thingy… But still not for the other 🙈

LukasReschke added a commit that referenced this issue Feb 24, 2016
The current logic is checking whether:

1. The returned value is a boolen
2. The returned value is a string and then matches for "true"

Since the config is now written to the database the data is now a string with the value "1" if HTTPS is set to true. Effectively this option was thus always disabled at the moment, falling back to plain HTTP.

This change casts the data to a boolean if it is defined as boolean.

Fixes #22605
Fixes #22016
@lock
Copy link

lock bot commented Aug 6, 2019

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 lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants