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
SFTP External storage doesn't work #1674
Comments
It appear that WebUi and Desktop client make PROPFIND query with no ending slash after the directory name. Like PROPFIND /remote.php/webdav/LINUX_HOME |
Hello, I have the same problem with a SMB share. I've tried to remove the trailing / using a reverse proxy, but it still make 503 errors... Here is the error: And the corresponding apache log: I'm trying here to access a "Partages" share on a Windows server (using LDAP authentication against an Active Directory Server). It works perfectly on the web UI (even in a mobile browser) and on the Windows WebDAV client. Thanks ! |
Hello, I have some news on this ! So I used a man-in-the-middle proxy, and I have found that the Android app never sends cookies where Windows does. I can see two cookies: Cookie:
If I add these two cookies to the request, the answer is correct ! Thanks ! |
I can confirm the same. Why does cookies not pass in mobile app? It also seems to be an issue with 3rd party OC apps as well for android. Does it happen on IOS? |
Android app doesn't use session cookies. It sends user and password in every request. Is there any reason why accessing SFTP external storage with user and password shouldn't work? |
@PVince81 , I vaguely remember there were some discussions "recently" about bugs related with sending user and password instead of session in OCS paths. I'm not sure if something similar could affect external storage. Do you recall any of this? |
@davivel that shouldn't make any difference. My steps:
And the log shows me that the requests did have a trailing slash and worked fine:
Please double check your setup, maybe something else (reverse proxy?) is messing with the requests ? Could you guys try with the similar curl commands ? |
Hello, Are you trying this using "use session credentials" ? Here is what I get when trying: curl -u quentin -X PROPFIND https://cloud.o2r.fr/remote.php/webdav/Home <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> (Exactly the same with the trailing / ) Apache2 logs: |
@QuentinC try the following SQL query: Then retry with curl and check your "owncloud.log" (not apache log) |
@PVince81 it's exactly the same (en fact, all storages where already with "available=1" in the SQL DB...) Here is the owncloud log: {"reqId":"inYdEssDOb/XFi7MjDKj", {"Message":"HTTP/1.1 503 Storage not available", "File": "level":4, |
@QuentinC are you able to access it over the web UI ? Originally this bug was only about Android/curl, but I don't see any reason why it would work in the web UI. It's either it works everywhere or not at all. |
@PVince81 yes, it's working great on the web UI, and also using the Windows WebDAV client ! |
Can you give more details about your SFTP connection ? I suspect that you might be using "use session credentials" mode which might explain the different results. |
@PVince81 |
@PVince81 If I set an external storage with fixed user and password (ie instead of session credentials), it works everywhere ! |
Ok, thanks. Then this is a server error. Even if there are no cookies, I expect a single request that does authenticate to also have the credentials stored in the temporary session. |
Closing this and raised another ticket in core to address this: owncloud/core#25511 |
@QuentinC I still cannot reproduce this with 9.0.3 and session mode. Curl works fine. |
I have the problem mainly on a SMB share. But, to be sure, I've set up a sftp share, using session credentials, and curl won't work... I'm using the version ownCloud 9.1.0 RC1 (beta) - latest daily build. |
I just tried on the stable9.1 branch which is more recent, also works. @QuentinC can you try with an empty sftp storage folder ? Just in case there are files in yours that would cause this as side effect. |
Exactly the same... |
I haven't, will try that soon... having trouble with the LDAP testing docker |
Well, could be the problem... |
Am now back on v9.0.3 and it looks even more broken. Will continue investigating in owncloud/core#25511 |
Expected behaviour
I want to browse my SFTP External Storage on owncloud server
Actual behaviour
Android app says 'Nothing here, send something'
But all other ownCloud client (Linux Desktop and WebUI) work fine
Steps to reproduce
Can this problem be reproduced with the official owncloud server?
no because it need an external mount storage with SFTP and LDAP user backend
Environment data
Android version:
6.0.1
Device model: Samsung Galaxy S6 SM G920F
Stock or customized system: Stock
ownCloud app version: 2.0.0
ownCloud server version: ownCloud 9.0.2 (stable)
Logs
Web server error log
nginx_owncloud: 192.168.57.81 - pgindraud [15/May/2016:11:27:17 +0200] "GET /ocs/v1.php/cloud/capabilities?format=json HTTP/1.1" 200 607 "-" "Mozilla/5.0 (Android) ownCloud-android/2.0.0"
nginx_owncloud: 192.168.57.81 - pgindraud [15/May/2016:11:27:17 +0200] "PROPFIND /remote.php/webdav/LINUX_HOME/ HTTP/1.1" 503 234 "-" "Mozilla/5.0 (Android) ownCloud-android/2.0.0"
ownCloud log (data/owncloud.log)
ownCloud[9730]: {webdav} Exception: {
"Message":"HTTP/1.1 503 Storage not available",
"Exception":"Sabre\DAV\Exception\ServiceUnavailable",
"Code":0,
"Trace":"
#0 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(903): OCA\DAV\Connector\Sabre\ObjectTree->getNodeForPath('LINUX_HOME')
#1 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(334): Sabre\DAV\Server->getPropertiesForPath('LINUX_HOME', Array, 0)
#2 [internal function]: Sabre\DAV\CorePlugin->httpPropFind(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#3 /var/www/owncloud/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)
#4 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(459): Sabre\Event\EventEmitter->emit('method:PROPFIND', Array)
#5 /var/www/owncloud/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
#6 /var/www/owncloud/apps/dav/appinfo/v1/webdav.php(55): Sabre\DAV\Server->exec()
#7 /var/www/owncloud/remote.php(138): require_once('/var/www/ownclo...')
#8 {main}","File":"/var/www/owncloud/apps/dav/lib/connector/sabre/objecttree.php","Line":159,"User":"ae877d96-3ba9-1035-95bb-6fbf9d048cee"}
The text was updated successfully, but these errors were encountered: