Hi all,
I have troubles accessing my Nextcloud over WebDAV.
Sorry for the long post. The trouble is at the client-end, and as such hardly has to do with Yunohost, but maybe one of you also is running KDE with Nextcloud and has an idea where to look.
I do recall from years ago, that it took a few tries the first time. Not always at the bleeding edge, my desktop was probably running Jessie or perhaps Stretch, so quite a bit might have changed. I’m not even sure whether I already ran Bullseye before reinstalling, or that my desktop was still running Buster. All in all, the not-working situation may now be quite different from the working situation I had before.
My YunoHost server
Hardware: computer at home
YunoHost version:
- yunohost version: 11.2.8.2 (stable)
- yunohost-admin version: 11.2.3 (stable)
- moulinette version: 11.2 (stable)
- ssowat version: 11.2 (stable)
I have access to my server : Through SSH | through the webadmin | keyboard/screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If your request is related to an app, specify its name and version:
id: nextcloud
version: 27.1.4 and earlier
My computer
Debian 11, mostly KDE/Plasma oriented, with LXQt as window manager.
I use SSHFS for read-only access to Nextcloud, it seems faster than WebDAV. To write things and have them available via Nextcloud, I’d have to occ scan files with some regularity, or use WebDAV, as it is intended.
Initially my Dolphin had no problems, but a year back or so I broke my desktop enough to warrant re-installation of the system. Since then, I have been unable to connect Dolphin over WebDAV to Nextcloud. Every so often I spend a frustrated evening trying once more, so far without any success.
Connection options tried:
- Dolphin-related:
- Dolphin via KNetAttach wizard: error - file or folder does not exist
- Dolphin via address bar: error - file or folder does not exist
- Dolphin via manual ‘remote bookmark’ entry: error - file or folder does not exist
- Gigolo connect, then browse via gvfs: works, but superslow, and not integrated
- davfs2 FUSE module : ‘301 moved permanently’ on mount
Things that do work are all HTTP, instead of WebDAV (I think):
- The Nextcloud desktop client
- Regular access via the Nextcloud website
- Nextcloud client on Android
Dolphin KnetAttach wizard
The result is the same either with KNetAttach standalone or as a wizard in Dolphin. When I use it to connect Dolphin to Nextcloud over WebDAV, via the “Remote” option:
In the wizard I enter the details as found in my Nextcloud, at the bottom left in the files overview;
When I “Save & Connect” , I get a popup asking “Sure? The website does not require authentication. This may be an attempt to trick you”.
Yes, go ahead. Then a popup, unable to connect:
Dolphin via address bar
Another option would be to just enter the webdav-address in the address bar, like this:
Dolphin via remote bookmark
I played with a bookmark in the ‘Remote’ section. Same result.
Gigolo
Gigolo is a small problem for accessing GIO resources, the Gnome equivalent of KIO. Using Gigolo to connect to Nextcloud, I could browse my files over gvfs once. More specific, when configuring the connection just once and without changing anything:
- first try: opens Konqueror, “File or folder does not exist”
- second try: opens Konqueror, loads for quite a while, and shows my Nextcloud root folder.
- subsequent tries: opens Konqueror in an empty screen, not waiting, no errors; reload takes a fraction of a second, but does not change anything
FUSE mount via davfs2
Mounting over FUSE seems a good alternative to having a remote bookmark in Dolphin.
$ mount photos_online/
Please enter the username to authenticate with server
stuff.domain.tld/nextcloud/remote.php/dav/files/wbk or hit enter for none.
Username: wbk
Please enter the password to authenticate user wbk with server
stuff.domain.tld/nextcloud/remote.php/dav/files/wbk or hit enter for none.
Password:
/sbin/mount.davfs: Mounting failed.
301 Moved Permanently
$ cat /etc/fstab |grep photos_online
stuff.domain.tld/nextcloud/remote.php/dav/files/wbk /home/wbk/photos_online davfs user,rw,auto 0 0
$
Some resources
As far as I found out, all WebDAV connections run over FUSE.
According to Wikipedia, Konqueror has its built in WebDAV client. KIO, GVFs and davfs2 seem to depend on VFS.
There is GnomeVFS (depricated) and Gnome virtual file system (new, or the other way around), both conveniently abbreviated as GVFs. Gigolo uses GVFs / GIO
Logs?
I’m not sure where to look for logging. Nginx does not have errors (`stuff.domain.tld-err.log, while the access log gets hit when connecting
# tail -f /var/log/nginx/stuff.domain.tld-access.log
172.26.78.10 - wbk [20/Jan/2024:17:50:51 +0000] "PROPFIND /nextcloud/remote.php/dav/files/wbk/ HTTP/1.1" 207 407 "-" "Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)"
172.26.78.10 - - [20/Jan/2024:17:50:56 +0000] "PROPFIND / HTTP/1.1" 302 138 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:50:56 +0000] "PROPFIND /nextcloud/remote.php/dav/files/wbk/ HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:50:56 +0000] "PROPFIND /nextcloud/remote.php/dav/files/wbk HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:50:56 +0000] "PROPFIND /nextcloud/remote.php/dav/files/wbk HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:50:56 +0000] "PROPFIND /nextcloud/remote.php/dav/files/wbk HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
Recalling the 301 in davfs, I also put tail -f
on the access log of the main domain. When clicking on the Dolphin remote bookmark, or entering the address in the address bar, together with the above log is stuff.domain.tld, I get the below line in /var/log/nginx/domain.tld-access.log
(which is the main domain):
2a10:3781:2d49::1efb - - [20/Jan/2024:17:50:56 +0000] "PROPFIND /yunohost/sso/ HTTP/1.1" 405 150 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
Additionally, when accessing Nextcloud over WebDAV at a higher level in the directory tree, the propfind list in the access log for the Nextcloud domain gets much longer:
# tail -f /var/log/nginx/stuff.domain.tld-access.log
172.26.78.10 - wbk [20/Jan/2024:17:52:14 +0000] "PROPFIND /nextcloud/remote.php/dav/files/wbk/Documents HTTP/1.1" 207 397 "-" "Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)"
172.26.78.10 - wbk [20/Jan/2024:17:52:15 +0000] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 304 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
172.26.78.10 - wbk [20/Jan/2024:17:52:27 +0000] "PROPFIND /nextcloud/remote.php/dav/files/wbk/ HTTP/1.1" 207 407 "-" "Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)"
172.26.78.10 - - [20/Jan/2024:17:52:34 +0000] "PROPFIND /nextcloud/remote.php/dav/files/ HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:34 +0000] "PROPFIND /nextcloud/remote.php/dav/ HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND / HTTP/1.1" 302 138 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud HTTP/1.1" 301 162 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND / HTTP/1.1" 302 138 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud HTTP/1.1" 301 162 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud/remote.php/dav HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud/remote.php/dav/ HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud/remote.php/dav/ HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud/remote.php HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud/remote.php HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud/remote.php/dav HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND / HTTP/1.1" 302 138 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND / HTTP/1.1" 302 138 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud HTTP/1.1" 301 162 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud/remote.php HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:39 +0000] "PROPFIND /nextcloud/remote.php/dav HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:40 +0000] "PROPFIND /nextcloud/ HTTP/1.1" 405 434 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:40 +0000] "PROPFIND /nextcloud/ HTTP/1.1" 405 434 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - - [20/Jan/2024:17:52:40 +0000] "PROPFIND /nextcloud/ HTTP/1.1" 405 434 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) dolphin/20.12.2 Safari/534.34"
172.26.78.10 - wbk [20/Jan/2024:17:52:40 +0000] "GET /nextcloud/apps/files/api/v1/stats HTTP/2.0" 200 201 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
172.26.78.10 - wbk [20/Jan/2024:17:52:44 +0000] "PROPFIND /nextcloud/remote.php/dav/files/wbk/Documents HTTP/1.1" 207 397 "-" "Mozilla/5.0 (Linux) mirall/3.1.1-2+deb11u1 (Nextcloud)"
Accessing the https-URL that Nextcloud gives in the browser, by the way, gives the expected “For webdav-eyes only”-line. The URL (apart from the protocol) would be OK, it is what I use for my phone as well, with the same credentials.
Any idea what is going on?