What is the problem you are having with rclone?
Can't rename files (including directories) in WebDAV server of rclone serve webdav
, if --baseurl
is specified.
I tested this in Windows (putting \\localhost@8080\test
in explorer's location bar) and Mac (mount_webdav
command), and both failed in renaming files.
This is probably caused by wrong handling of "MOVE" requests invoked on renaming. The "destination" field of a "MOVE" request header contain the baseurl, which should be cut off.
I learned this in writing some kind of WebDAV proxy for myself. The error is exactly same as I encountered then.
Run the command 'rclone version' and share the full output of the command.
confirmed in three versions:
rclone v1.65.2
- os/version: Microsoft Windows 11 Home 22H2 (64 bit)
- os/kernel: 10.0.22621.3155 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: cmount
rclone v1.61.1
- os/version: Microsoft Windows 11 Home 22H2 (64 bit)
- os/kernel: 10.0.22621.3155 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.19.4
- go/linking: static
- go/tags: cmount
rclone v1.65.1
- os/version: darwin 13.5.2 (64 bit)
- os/kernel: 22.6.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.21.5
- go/linking: dynamic
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
local (but should happen in all storage type)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone serve webdav . --baseurl test
The rclone config contents with secrets removed.
N/A
A log from the command with the -vv
flag
I tried to rename testdir/testfile to testdir/testfile2 .
2024/02/15 22:11:39 INFO : test/testdir/testfile: MOVE from 127.0.0.1:54799
2024/02/15 22:11:40 DEBUG : /testdir: OpenFile: flags=O_RDONLY, perm=----------
2024/02/15 22:11:40 DEBUG : /testdir: >OpenFile: fd=testdir/ (r), err=<nil>
2024/02/15 22:11:40 DEBUG : /testdir: OpenFile: flags=O_RDONLY, perm=----------
2024/02/15 22:11:40 DEBUG : /testdir: >OpenFile: fd=testdir/ (r), err=<nil>
2024/02/15 22:11:40 INFO : test/testdir: PROPFIND from 127.0.0.1:54800
2024/02/15 22:11:40 DEBUG : /testdir: OpenFile: flags=O_RDONLY, perm=----------
2024/02/15 22:11:40 DEBUG : /testdir: >OpenFile: fd=testdir/ (r), err=<nil>
2024/02/15 22:11:40 DEBUG : /testdir: OpenFile: flags=O_RDONLY, perm=----------
2024/02/15 22:11:40 DEBUG : /testdir: >OpenFile: fd=testdir/ (r), err=<nil>
2024/02/15 22:11:40 INFO : test/testdir: PROPFIND from 127.0.0.1:54801
2024/02/15 22:11:40 DEBUG : : OpenFile: flags=O_RDONLY, perm=----------
2024/02/15 22:11:40 DEBUG : : >OpenFile: fd=/ (r), err=<nil>
2024/02/15 22:11:40 DEBUG : : OpenFile: flags=O_RDONLY, perm=----------
2024/02/15 22:11:40 DEBUG : : >OpenFile: fd=/ (r), err=<nil>
2024/02/15 22:11:40 INFO : test: PROPFIND from 127.0.0.1:54802