[unsolvable] I can't get Dolphin to connect to Nextcloud over WebDAV

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”.

image

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?

Hi friend, you should blur your domain name on the pictures.
I tried to navigate to the login page of your nextcloud and it was extremely slow. Maybe your upload speed is too low or maybe you should disable the nextcloud apps (all non “default”) and check again

1 Like

Hi Jarod,

Thank you for the reminder.

It is somewhat of a calculated risk. I gathered my Yunohost is on the public internet anyway, bad actors as well as good ones scan it multiple times per second. Not having the domain in easily scrapable text would more or less obscure it for search engines visiting the forums, but having it in the screenshots only shows it to other visitors, who are mostly Yunohost users as well. I put them on the list of ‘good actors’ :wink:

Blurring the screenshots would not help in troubleshooting a mismatch between what I write and what I show. Earlier I had a problem with Firefox Syncstorage not connecting, where it hit SSO. It turned out I had the wrong URL all along. Here I also hit SSO, and WebDAV not finding a resource. I’m not so sure of my copy/paste skills anymore as I once was :rofl:

In one way it has already helped me: you noticed the (lack of) speed when loading the site. I could disable the apps while troubleshooting. The number of active apps has been growing steadily, but the subjective speed, once using the services, is OK. Especially the dashboard takes long to load, but I would not expect the apps to interfere with a back-end service such as WebDAV. There also is hardly any load on the machine.

In the mean time, if anyone who uses KDE Plasma or LXQt passes by who can connect Dolphin successfully, please give a shout!

I’m running kde with dolphin. I’m using sshfs mainly. So I tried today to test webdav on nextcloud and frankly I wasn’t expecting it to be usable. Anyway, the dolphin wizard is misleading. According to the NC docs :

. Enter the following settings:

  • Name: the name you want to see in the Places bookmark, for example, Nextcloud.
  • User: the Nextcloud username you used to log in, for example, admin.
  • Server: the Nextcloud domain name, for example, example.com (without http:// before or directories afterwards).
  • Folder – Enter the path nextcloud/remote.php/dav/files/USERNAME/.

But what I was doing is to provide the full domain+path+“remote.php/dav/files/USERNAME” in server and only “/” in folder. What worked : in server only the main domain (not of NC but of yuno) and the rest in folder. Anyway, I don’t know why it didn’t work with the first approach when you can simply use webdavs://USER@drive.DOMAIN.ovh:443/remote.php/dav/files/USER/ in the address bar.
it poped up multiple times that the site doesn’t have authentication, do you continue? I said yes to all. and at last it asked for password.

Another important thing to note :

When using a third-party WebDAV client (including your operating system’s built-in client), you should use an application password for login rather than your regular password. In addition improved security, this increases performance significantly

In NC webadmin > personal settings > Security > create an app password (at the bottom).

I must say that I was impressed even if it could be better but I remember that I dropped NC webdav because it was way too slow.

Thank you for your trouble!

How do you mean that?

My main domain is at domain.tld
My Nextcloud is at stuff.domain.tld/nextcloud

You would enter domain.tld as server? Or stuff.domain.tld ?
In folder would go nextcloud/remote.php/dav/files/user

Yes, that is much less complex than using the wizard :stuck_out_tongue:

I had not yet tried it with explicitly naming the port; when doing that, it did not make any difference.

What did make a difference, in that it did not give any error, timeout or information, was using the webdavs:// protocol in the address bar with the Nextcloud URL excluding the Nextcloud-domain, ie, webdavs://domain.tld/nextcloud/remote.php/dav/files/wbk. The access log for maindomain.tld would get spammed with PROPFIND lines, but no externally visible result.

Against better judgement, I also tried connecting with the server’s IP address instead of domain name, with as expected no result.

Searching the 'Net further, I saw mention of ‘Online Accounts’ in KDE Settings. I had seen it before, but not payed attention: I wouldn’t need it, because I already had webdav libraries installed. Here it was quite explicit though, and I noticed ‘Online Accounts’ missing in my KDE Settings.

I’m quite sure that is because I never installed the full KDE desktop, but LXQt instead.
After # apt install kaccounts-integration kaccounts-providers I have them. Adding a Nextcloud account, again, runs into problems:

No matter whether I enter (main) domain.tld, stuff.domain.tld, stuff.domain.tld/nextcloud or stuff.domain.tld/nextcloud/remote.php/dav/files/wbk or any variation.
What I do notice in stuff.domain.tld-access.log, is that this account-wizard hits /nextcloud/status.php on my server.
Now /nextcloud/status.php does exist, but the status code in the log is HTTP 412, ‘Precondition failed’:

172.26.78.10 - - [21/Jan/2024:08:15:16 +0000] "GET /nextcloud/status.php HTTP/1.1" 412 66 "-" "Mozilla/5.0 (X11;) AppleWebKit/534.34 (KHTML, like Gecko) systemsettings/5.20.5 Safari/534.34"

I had some small hope that installing the Kaccount-dependencies would one way or another solve my problem with accessing Nextcloud via WebDAV in Dolphin, unfortunately that is not the case.

It must be something missing in my desktop; I think the rest of the family does not have problems accessing Nextcloud (but I’d have to pry their laptops from their fingers to find out what has been configured there, years ago). I’ll report back on that.

Oh, yes,

Thanks for highlighting that, and the way to find it.

When first having the problem connecting, I had just (succesfully, without trouble) connected the Nextcloud Desktop client using an app password.

I intended to use an app password for Dolphin / WebDAV as well, but the ‘webserver does not require authentication’ and general inability to connect, combined with finding Nextcloud credentials in KDE Wallet, made me suppose the credentials from Nextcloud Desktop got halfway re-used, via the wallet, for Dolphin.

After removing Nexctloud Desktop and all credentials in KDE Wallet, that does not seem to have any relation, but my unfamiliarity with app passwords has lead to me having dozens of app passwords with one-time-shown credentials, without any idea what they are used for (since deleted most of them, ready to add another when something all of a sudden has no working connection anymore)

Are you able to keep the list of sessions and app passwords a bit tidy?

It’s officially a client installation problem now.

I tried on my laptop, also running Bullseye, but KDE Plasma instead of LXQt, and got Nextcloud added to Dolphin in barely ten seconds sing the same URL, more specifficaly, stuff.domain.tld as server, and nextcloud/remote.php/dav/user/wbk as folder, using secure connection. The resulting location in the address bar, when visiting, webdavs://stuff.domain.tld/nextcloud/remote.php/dav/files/wbk. It keeps working when adding wbk@ in front, adding :443 as port or leaving out /files/wbk at the end. It seems quite robust, so having it not work in any fashion on my laptop relieves me of a PEBKAC-error.

Maybe I’ll see whether it works on my desktop from a KDE session, else it is what it is and Ill leave it at that.

Thanks for you trouble!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.