server icon indicating copy to clipboard operation
server copied to clipboard

Webdav Client's can't find Server

Open GYJohn opened this issue 7 years ago • 13 comments

Steps to reproduce

  1. Upgrade vom 14 to 15

Expected behaviour

Webdav should work :)

Actual behaviour

The client can't find the webdav dir.

Server configuration

Operating system: Debian 9

Web server: Apache2

PHP version: 7.0

Nextcloud version: (see Nextcloud admin page) 15

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from: Shell Updater

List of activated apps:

App list
Enabled:
  - accessibility: 1.1.0
  - calendar: 1.6.4
  - cloud_federation_api: 0.1.0
  - dav: 1.8.1
  - federatedfilesharing: 1.5.0
  - files: 1.10.0
  - files_pdfviewer: 1.4.0
  - files_sharing: 1.7.0
  - files_texteditor: 2.7.0
  - files_trashbin: 1.5.0
  - files_videoplayer: 1.4.0
  - gallery: 18.2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.3.0
  - notifications: 2.3.0
  - oauth2: 1.3.0
  - provisioning_api: 1.5.0
  - serverinfo: 1.5.0
  - theming: 1.6.0
  - twofactor_backupcodes: 1.4.1
  - twofactor_totp: 2.1.0
  - updatenotification: 1.5.0
  - workflowengine: 1.5.0
Disabled:
  - activity
  - admin_audit
  - comments
  - encryption
  - federation
  - files_external
  - files_versions
  - firstrunwizard
  - nextcloud_announcements
  - password_policy
  - sharebymail
  - support
  - survey_client
  - systemtags
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.lilalu.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.lilalu.com",
        "dbtype": "mysql",
        "version": "15.0.2.0",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "loglevel": 0,
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "updater.release.channel": "stable",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": []
    }
}

Are you using encryption: no

.well-known is available .htaccess:

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{HTTP_USER_AGENT}  DavClnt
  RewriteRule ^$         /remote.php/webdav/          [L,R=302]
  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
  RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
  RewriteRule ^\.well-known/webfinger /public.php?service=webfinger [QSA,L]
  RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
  RewriteRule ^remote/(.*) remote.php [QSA,L]
  RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
  RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

GYJohn avatar Jan 19 '19 14:01 GYJohn

thank you for reporting could you specify the used parameters for the webdav access and post the nextcloud log (the relevant parts; the last lines if you just tried to access over webdav), so we can see what's going wrong?

violoncelloCH avatar Jan 19 '19 23:01 violoncelloCH

@violoncelloCH Thanks for your answer. I try to access via https://cloud.lilalu.com. I also tried the link's which are displayed at the Nextcloud calendar.

At the log there is 4 times: {"reqId":"Y8rCAriv3Cd3f9d2mnod","level":0,"time":"2019-01-19T23:14:15+00:00","remoteAddr":"46.5.5.244","user":"--","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/","message":{"Exception":"OCA\\DAV\\Connector\\Sabre\\Exception\\PasswordLoginForbidden","Message":"","Code":0,"Trace":[{"file":"\/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Backend\/AbstractBasic.php","line":105,"function":"validateUserPass","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/html\/cloud\/apps\/dav\/lib\/Connector\/Sabre\/Auth.php","line":253,"function":"check","class":"Sabre\\DAV\\Auth\\Backend\\AbstractBasic","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.lilalu.com\/remote.php\/dav\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/cloud\/apps\/dav\/lib\/Connector\/Sabre\/Auth.php","line":155,"function":"auth","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.lilalu.com\/remote.php\/dav\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Plugin.php","line":201,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.lilalu.com\/remote.php\/dav\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Plugin.php","line":150,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.lilalu.com\/remote.php\/dav\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.lilalu.com\/remote.php\/dav\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/cloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"autoRequireLogin":true,"__class__":"Sabre\\DAV\\Auth\\Plugin"},"beforeMethod"],[{"absoluteUrl":"https:\/\/cloud.lilalu.com\/remote.php\/dav\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":466,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["beforeMethod",[{"absoluteUrl":"https:\/\/cloud.lilalu.com\/remote.php\/dav\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/html\/cloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/cloud.lilalu.com\/remote.php\/dav\/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/cloud\/apps\/dav\/lib\/Server.php","line":301,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/cloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/cloud\/remote.php","line":163,"args":["\/var\/www\/html\/cloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/html\/cloud\/apps\/dav\/lib\/Connector\/Sabre\/Auth.php","Line":141,"CustomMessage":"--"},"userAgent":"DAVdroid\/1.4.0.2-gplay (2017\/02\/12; dav4android; okhttp3) Android\/8.1.0","version":"15.0.2.0"}

GYJohn avatar Jan 19 '19 23:01 GYJohn

hmm, I guess that's a configuration issue, because you don't have https://cloud.lilalu.com in your trusted domains (in config.php) furthermore the ssl certificate which is used for https://cloud.lilalu.com is not valid for the domain...

violoncelloCH avatar Jan 19 '19 23:01 violoncelloCH

'trusted_domains' => array ( 0 => 'cloud.lilalu.com',

And the certificate is for this domain.. It's an lets encrypt certificate. With NC 14, everythink worked fine.

GYJohn avatar Jan 19 '19 23:01 GYJohn

why is "cloud.lilalu.com" not in the config report you originally posted then?

    "trusted_domains": [
       EDIT -- REMOVED
       EDIT -- REMOVED
   ],

regarding the ssl certificate: my browser tells me NET::ERR_CERT_COMMON_NAME_INVALID and says the certificate would be only valid for *.kasserver.com also, if I ignore this warning, I get a 404 for cloud.lilalu.com/

violoncelloCH avatar Jan 19 '19 23:01 violoncelloCH

lilalu is not the real domain. Would be cool if you delete you quote for security reasons.

As i told you. Can't be the config and can't be the certificate. Just happenend after the update.

GYJohn avatar Jan 19 '19 23:01 GYJohn

ahh, sorry... thought it was the real domain, because it exists and you didn't replace it in the trusted domains as well... I deleted the lines from the quote...

generally: please use something like cloud.example.com so it's clear, it's a replacement value...

violoncelloCH avatar Jan 19 '19 23:01 violoncelloCH

Yeah u are right.. My mistake, sorry. Next time i will use example.

Do you have any other ideas?

GYJohn avatar Jan 19 '19 23:01 GYJohn

I'm trying to reproduce it... do you have an error log from davdroid? and the apache error log could be interesting too...

I can't reproduce it, but with wrong credentials davdroid/dav-x-5 tells me it couldn't find a CalDAV- / CardDAV-service... (both if I'm using only the domain or the full dav path) so could you double check your used credentials?

violoncelloCH avatar Jan 20 '19 00:01 violoncelloCH

@violoncelloCH FFS. You are so damn right. I disabled the new 2FA! Then it work's. With the old plugin it works without any problem.

GYJohn avatar Jan 20 '19 12:01 GYJohn

Oh wow. I disabled 2FA and it sync's. After enabling it again, the same error "wrong credentials". Is there any solution?

GYJohn avatar Jan 20 '19 12:01 GYJohn

There are app-passwords for such clients not supporting oauth with 2fa... can you try if it works then?

violoncelloCH avatar Jan 20 '19 12:01 violoncelloCH

Yeah works.. i am stupid. Sorry.. Thanks for your help!

GYJohn avatar Jan 20 '19 12:01 GYJohn