Can't fully connect to WebDAV server

What is the problem you are having with rclone?

I'm trying to set up a WebDAV server on an Ubuntu Linux box with rclone serve webdav read-it-later:/s/zk/docs/ --addr :10092 --log-level DEBUG --dir-cache-time=15s --vfs-cache-mode full - specifically I want to make absolute path /s/zk/docs/ available. I used rclone config to create this configuration:

[read-it-later]
type = webdav
url = http://0.0.0.0:10092
vendor = other

I'm trying to connect two WebDAV clients to the server. 1) Android Mixplorer app and 2) SingleFile Chrome extension via their WebDAV destination. When connecting both (with no credentials), the clients appear to 'hang' and the server is clearly getting something from them as per the below log, but it never finishes. When I manually terminate the rclone command, both of these clients, immediately fail. Here is the complete log for the rclone command above:

rclone serve webdav read-it-later:/s/zk/docs/ --addr :10092 --log-level DEBUG --dir-cache-time=15s --vfs-cache-mode full
2024/01/12 19:00:22 DEBUG : rclone: Version "v1.53.3-DEV" starting with parameters ["rclone" "serve" "webdav" "read-it-later:/s/zk/docs/" "--addr" ":10092" "--log-level" "DEBUG" "--dir-cache-time=15s" "--vfs-cache-mode" "full"]
2024/01/12 19:00:22 DEBUG : Using config file from "/home/rww/.config/rclone/rclone.conf"
2024/01/12 19:00:22 DEBUG : Creating backend with remote "read-it-later:/s/zk/docs/"
2024/01/12 19:00:22 DEBUG : fs cache: renaming cache item "read-it-later:/s/zk/docs/" to be canonical "read-it-later:s/zk/docs"
2024/01/12 19:00:22 INFO  : webdav root 's/zk/docs': poll-interval is not supported by this remote
2024/01/12 19:00:22 DEBUG : vfs cache: root is "/home/rww/.cache/rclone/vfs/read-it-later/s/zk/docs"
2024/01/12 19:00:22 DEBUG : vfs cache: metadata root is "/home/rww/.cache/rclone/vfs/read-it-later/s/zk/docs"
2024/01/12 19:00:22 DEBUG : Creating backend with remote "/home/rww/.cache/rclone/vfs/read-it-later/s/zk/docs"
2024/01/12 19:00:22 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2024/01/12 19:00:22 NOTICE: webdav root 's/zk/docs': WebDav Server started on http://[::]:10092/
2024/01/12 19:00:25 DEBUG : /: OpenFile: flags=O_RDONLY, perm=----------
2024/01/12 19:00:25 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2024/01/12 19:00:25 DEBUG : /: OpenFile: flags=O_RDONLY, perm=----------
2024/01/12 19:00:25 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2024/01/12 19:00:25 DEBUG : /: OpenFile: flags=O_RDONLY, perm=----------
2024/01/12 19:00:25 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2024/01/12 19:01:13 DEBUG : /Top topics - rclone forum (1_12_2024 1_01_13 PM).html: OpenFile: flags=O_RDONLY, perm=----------

The last line was a minute later, when I tried to use SingleFile which attempted to send a file to the server. The (1_12_2024 1_01_13 PM).html shows that the server is getting something, but nothing else happens. The preceeding handful of lines are all from MiXplorer's WebDAV connection attempt, and that app just shows a 'loading' symbol.

Run the command 'rclone version' and share the full output of the command.

rclone version
rclone v1.53.3-DEV
- os/arch: linux/amd64
- go version: go1.18.1

Which cloud storage system are you using? (eg Google Drive)

Ubuntu as the server, the above clients (mainly trying to get SingleFile working)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone serve webdav read-it-later:/s/zk/docs/ --addr :10092 --log-level DEBUG --dir-cache-time=15s --vfs-cache-mode full

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

This didn't work, but I added the config above.

A log from the command that you were trying to run with the -vv flag

See above

I should add that for clients I'm connecting with URL http://x:10092 and no username/password - x is a Tailscale domain name and I don't think it's a problem since the server is getting something for client requests. But I'm not sure if the URL needs to specify read-it-later or some filepath after the port number.

welcome to the forum,

please update to latest stable v1.65.1 and test again.

Thanks. I upgraded to v1.65.1 but still get the same issue, including after recreating config and also setting vendor to rclone.

not sure i understand your setup?

if you want to serve a local directory over webdav, then point to it directly.
rclone serve webdav /s/zk/docs ...

edit: i can see how you got confused,
as the rclone docs for rclone serve webdav has no example commands.

You do some weird configuration with this read-it-later remote. There is no rclone.conf needed in your case at all.

What you need is:

rclone serve webdav /s/zk/docs/ --addr :10092

to serve content of /s/zk/docs/ directory.

A few thoughts:

  1. I am a bit confused as to why you are WebDAV serving a WebDAV server.
  2. What server is running at http://0.0.0.0:10092? Is it rclone? (then you a really doing something weird :slight_smile: ). Assuming it's not, don't change the vendor.
  3. Given that http://0.0.0.0:10092 is a WebDAV server, what happens if you connect your two clients directly to that server? Or a totally different one?

@kapitainsky Thanks. I was trying to set the configs thinking they were required but didn't fully understand them. The command you suggested works as in the server runs, but I get the exact same effect trying to connect from my WebDAV clients above (server recognizes something, but then communications appear to cut out).

I changed the command slightly to specify the Tailscale direct IP address (did not touch the config file) as follows but then tried running SingleFile's WebDAV on a PC in the same LAN as the server running rclone. Interestingly it got much further with a 405 failure reported to teh client and some permission denied logs for folder creation (not sure why since permissions are 777 in the destination):

rww@rwwlx:~$ sudo rclone serve webdav /s/zk/docs/readitlater/ --addr 100.1.2.3:10092 -vv
2024/01/13 05:45:38 DEBUG : rclone: Version "v1.65.1" starting with parameters ["/snap/rclone/489/bin/rclone" "serve" "webdav" "/s/zk/docs/readitlater/" "--addr" "100.1.2.3:10092" "-vv"]
2024/01/13 05:45:38 DEBUG : Creating backend with remote "/s/zk/docs/readitlater/"
2024/01/13 05:45:38 NOTICE: Config file "/root/snap/rclone/489/.config/rclone/rclone.conf" not found - using defaults
2024/01/13 05:45:38 DEBUG : fs cache: renaming cache item "/s/zk/docs/readitlater/" to be canonical "/s/zk/docs/readitlater"
2024/01/13 05:45:38 INFO  : Local file system at /s/zk/docs/readitlater: poll-interval is not supported by this remote
2024/01/13 05:45:38 NOTICE: Local file system at /s/zk/docs/readitlater: WebDav Server started on [http://100.78.239.110:10092/]
2024/01/13 05:45:49 DEBUG : /Example Domain (1_12_2024 11_45_49 PM).html: OpenFile: flags=O_RDONLY, perm=----------
2024/01/13 05:45:49 DEBUG : /Example Domain (1_12_2024 11_45_49 PM).html: >OpenFile: fd=<nil>, err=file does not exist
2024/01/13 05:45:49 INFO  : /Example Domain (1_12_2024 11_45_49 PM).html: HEAD from 100.82.35.16:58528
2024/01/13 05:45:49 DEBUG : /Example Domain (1_12_2024 11_45_49 PM).html: OpenFile: flags=O_RDWR|O_CREATE|O_TRUNC, perm=-rw-rw-rw-
2024/01/13 05:45:49 DEBUG : Example Domain (1_12_2024 11_45_49 PM).html: Open: flags=O_RDWR|O_CREATE|O_TRUNC
2024/01/13 05:45:49 DEBUG : : Added virtual directory entry vAddFile: "Example Domain (1_12_2024 11_45_49 PM).html"
2024/01/13 05:45:49 DEBUG : Example Domain (1_12_2024 11_45_49 PM).html: >Open: fd=Example Domain (1_12_2024 11_45_49 PM).html (w), err=<nil>
2024/01/13 05:45:49 DEBUG : /Example Domain (1_12_2024 11_45_49 PM).html: >OpenFile: fd=Example Domain (1_12_2024 11_45_49 PM).html (w), err=<nil>
2024/01/13 05:45:49 DEBUG : : Added virtual directory entry vAddFile: "Example Domain (1_12_2024 11_45_49 PM).html"
2024/01/13 05:45:49 DEBUG : Local file system at /s/zk/docs/readitlater: File to upload is small (13785 bytes), uploading instead of streaming
2024/01/13 05:45:49 ERROR : Example Domain (1_12_2024 11_45_49 PM).html: Failed to copy: mkdir /s: permission denied
2024/01/13 05:45:49 ERROR : Example Domain (1_12_2024 11_45_49 PM).html: WriteFileHandle.New Rcat failed: mkdir /s: permission denied
2024/01/13 05:45:49 DEBUG : Example Domain (1_12_2024 11_45_49 PM).html: Remove: 
2024/01/13 05:45:49 DEBUG : : Added virtual directory entry vDel: "Example Domain (1_12_2024 11_45_49 PM).html"
2024/01/13 05:45:49 DEBUG : Example Domain (1_12_2024 11_45_49 PM).html: >Remove: err=<nil>
2024/01/13 05:45:49 INFO  : /Example Domain (1_12_2024 11_45_49 PM).html: PUT from 100.82.35.16:58528

So yes, the above isn't fully working but I think the bigger issue is somehow the non-LAN Tailscale issue may be causing some sort of interference, despite me using the same Tailscale address with two devices on a LAN (both also run Tailscale but it might be bypassed). I've never had an issue with that before so it's surprising.

@jwink3101

  1. I've run Samba for a few years but am a WebDAV novice. My config file was a thrown together attempt to get something working and doesn't mean anything.
  2. I'm not sure what vendor is for (was leaving it as other when using the older version) but @kapitainsky 's comment makes it seem like it doesn't need to be touched. My goal with WebDAV is described at the end of this post but I'm essentially trying to make the server directory /s/zk/docs/readitlater/ accessible via Tailscale for any number of SingleFile WebDAV clients that will occasionally write an HTML file to that directory. I'm trying to make it available via port 10092 of that computer and rclone serve webdav /s/zk/docs/readitlater/ --addr x:10092 is my current attempt to do that.
  3. Following that, I think that means rclone is the 'server' running there and I connect my clients above to get the above logs, but I may misunderstand your question.

Forget VPN and test first if all works when you connect directly to your LAN
IP address from some WebDAV client.

use restic serve webdav /s/zk/docs/readitlater/ --addr :10092 to make sure it is listening on all ports.

Only if working focus on your networking setup.

You can install WebDAV client on the same machine you are running server and try to connect to 127.0.0.1:10092

And I think this is the problem. You installed snap version of rclone. Remove it. Make also sure you remove repo one version - sudo apt remove rclone and install using:

sudo -v ; curl https://rclone.org/install.sh | sudo bash

Snap installed apps are heavily sandboxed with very limited access to the system. Maybe you can change snap permissions and allow everything what you need but I would not bother as it is often impossible.

Snap is disastrous for any apps that require more complex access to the system - rclone acting as a server is good example.

@kapitainsky Thank you so much. Installing via curl instead of outdated apt / bad snap fixed it (plus the previously provided command without config file). Now it works locally and over Tailscale, problem solved.

Would you recommend I create a systemctl service for this to keep it running 24/7 surviving restarts, or cronjob? I haven't seen a standard way to keep this command persistently running.

It is up to you but myself I would indeed create systemd service. rclone itself does not have any built in functionality to keep it running. It is left for user and OS to manage.

1 Like

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