Server: WebDAV mounting problem

Created on 26 Sep 2019  路  6Comments  路  Source: nextcloud/server

Steps to reproduce

  1. Run docker run -d -p 8080:80 nextcloud:16.0.4-fpm
  2. Try to mount admin folder sudo mount -t davfs localhost:8080/remote.php/webdav/files/admin /mnt -o noexec
  3. Type username and password

Expected behaviour

The admin's folder should be mounted to /mnt/

Actual behaviour

/usr/bin/mount.davfs: mounting failed; the server does not support WebDAV

Server configuration

Operating system:
Debian 10

Web server:
nginx-fpm

Database:
sqlite

PHP version:
7.3.9

Nextcloud version: (see Nextcloud admin page)
16.0.4

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

Where did you install Nextcloud from:
docker image 16.0.4-fpm

Signing status:


Signing status

No errors have been found.

List of activated apps:


App list

Enabled:
  - accessibility: 1.2.0
  - activity: 2.9.1
  - cloud_federation_api: 0.2.0
  - comments: 1.6.0
  - dav: 1.9.2
  - federatedfilesharing: 1.6.0
  - federation: 1.6.0
  - files: 1.11.0
  - files_pdfviewer: 1.5.0
  - files_rightclick: 0.15.1
  - files_sharing: 1.8.0
  - files_texteditor: 2.8.0
  - files_trashbin: 1.6.0
  - files_versions: 1.9.0
  - files_videoplayer: 1.5.0
  - firstrunwizard: 2.5.0
  - gallery: 18.3.0
  - logreader: 2.1.0
  - lookup_server_connector: 1.4.0
  - nextcloud_announcements: 1.5.0
  - notifications: 2.4.1
  - oauth2: 1.4.2
  - password_policy: 1.6.0
  - privacy: 1.0.0
  - provisioning_api: 1.6.0
  - recommendations: 0.4.0
  - serverinfo: 1.6.0
  - sharebymail: 1.6.0
  - support: 1.0.0
  - survey_client: 1.4.0
  - systemtags: 1.6.0
  - theming: 1.7.0
  - twofactor_backupcodes: 1.5.0
  - updatenotification: 1.6.0
  - viewer: 1.1.0
  - workflowengine: 1.6.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_ldap

Nextcloud configuration:


Config report

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "objectstore_multibucket": {
            "class": "\\OC\\Files\\ObjectStore\\S3",
            "arguments": {
                "num_buckets": 64,
                "bucket": "nextcloud-",
                "autocreate": true,
                "key": "keyaccess",
                "secret": "supersecretpassword",
                "use_ssl": false,
                "hostname": "10.36.0.208",
                "port": 9000,
                "use_path_style": true
            }
        },
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nc.domain.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "16.0.4.1",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "nc.domain.org",
        "overwriteprotocol": "https"
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
Browser is not using

Operating system:
Arch Linux, 5.1.16

Logs

Web server error log

No logs for this situation

Nextcloud log (data/nextcloud.log)

No logs for this situation

Browser log

Browser is not using

UPD

After enabling ignore_dav_header 1 in /etc/davfs2/davfs2.conf - I could mount the directory.
So,the problem is in some headers. Which one?

0. Needs triage bug needs info

Most helpful comment

It started to work after adding ignore_dav_header 1 in /etc/davfs2/davfs2.conf
so, the problem is somewhere in nginx_proxy headers. It is my infrastructure

All 6 comments

To use the fpm image you need an additional web server that can proxy http-request to the fpm-port of the container. For fpm connection this container exposes port 9000.

https://github.com/nextcloud/docker#using-the-fpm-image

the web-server is also configured and running, otherwise how could I get access to the interface ;-)
My production installation is here: https://github.com/nextcloud/server/issues/17230

  1. Run docker run -d -p 8080:80 nextcloud:16.0.4-fpm

Why do you post wrong steps to reproduce then?

sudo mount -t davfs localhost:8080/remote.php/webdav/files/admin /mnt -o noexec

sudo mount -t davfs localhost:8080/remote.php/webdav/ /mnt -o noexec works for me. Its the address shown in nextcloud.

These are basic steps, all how-to are written in docs.
Yes, the address is form settings (left bottom corner of homepage).
I suppose, the problem can be in reverse-proxy

Does it work for you with the above url?

It started to work after adding ignore_dav_header 1 in /etc/davfs2/davfs2.conf
so, the problem is somewhere in nginx_proxy headers. It is my infrastructure

Was this page helpful?
0 / 5 - 0 ratings