Repository navigation
Open
Labels
Description
Before you start
- I have searched the forum and the existing issues for this problem.
- I have tested with the latest beta or stable release and can still reproduce the problem.
- This is a reproducible bug, not a usage question (questions belong on the forum).
Associated forum post URL
No response
What is the problem you are having with rclone?
When renaming a file, the VFS layer updates the file's internal identity (i.e., f.d, f.dPath, f.leaf) before executing the backend API call renameCall. If the call fails returning an error, the file's properties are not rolled back. This leaves the file in an inconsistent state: it still resides in the source directory, but its internal pointers point to the destination directory.
rclone version
rclone v1.76.0-DEV
- os/version: darwin 26.7 (64 bit)
- os/kernel: 25.6.0 (arm64)
- os/type: darwin
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.27.1
- go/linking: dynamic
- go/tags: none
Operating system
macOS
Which cloud storage system are you using?
local disk
Output of rclone config redacted
; empty config
### Double check the config for sensitive info before posting publiclyThe command you were trying to run
mkdir -p root/dest_dir && echo "original" > root/file1.txt
chmod a-w root/dest_dir # make dir non-writable to make the backend move fail
./rclone serve webdav root --addr 127.0.0.1:18080 -vv --log-file serve.log &
SERVE=$!
R=":webdav,url='http://127.0.0.1:18080':"
./rclone moveto "${R}file1.txt" "${R}dest_dir/file1.txt" # fails with 403, as expected
chmod u+w root/dest_dir # restore dir writability
echo "NEW" | rclone rcat "${R}file1.txt" # overwrite file1.txt
cat root/file1.txt # prints "original" - expected "NEW"
cat root/dest_dir/file1.txt # prints "NEW" - expected: no such file
kill $SERVEA log from the command with the -vv flag
2026/10/09 10:20:45 DEBUG : rclone: Version "v1.76.0-DEV" starting with parameters ["./rclone" "serve" "webdav" "root" "--addr" "127.0.0.1:18080" "-vv" "--log-file" "serve.log"]
2026/10/09 10:20:45 DEBUG : Creating backend with remote "root"
2026/10/09 10:20:45 NOTICE: Config file "/Users/biagio/.config/rclone/rclone.conf" not found - using defaults
2026/10/09 10:20:45 INFO : Local file system at root: poll-interval is not supported by this remote
2026/10/09 10:20:45 NOTICE: Local file system at root: WebDav Server started on [http://127.0.0.1:18080/]
2026/10/09 10:20:45 DEBUG : /file1.txt: OpenFile: flags=O_RDONLY, perm=----------
2026/10/09 10:20:45 DEBUG : file1.txt: Open: flags=O_RDONLY
2026/10/09 10:20:45 DEBUG : file1.txt: >Open: fd=file1.txt (r), err=<nil>
2026/10/09 10:20:45 DEBUG : /file1.txt: >OpenFile: fd=file1.txt (r), err=<nil>
2026/10/09 10:20:45 INFO : //file1.txt: PROPFIND from 127.0.0.1:55875
2026/10/09 10:20:45 DEBUG : /file1.txt: OpenFile: flags=O_RDONLY, perm=----------
2026/10/09 10:20:45 DEBUG : file1.txt: Open: flags=O_RDONLY
2026/10/09 10:20:45 DEBUG : file1.txt: >Open: fd=file1.txt (r), err=<nil>
2026/10/09 10:20:45 DEBUG : /file1.txt: >OpenFile: fd=file1.txt (r), err=<nil>
2026/10/09 10:20:45 INFO : //file1.txt: PROPFIND from 127.0.0.1:55875
2026/10/09 10:20:45 INFO : //dest_dir/file1.txt: PROPFIND from 127.0.0.1:55876
2026/10/09 10:20:45 INFO : //dest_dir/: MKCOL from 127.0.0.1:55876
2026/10/09 10:20:45 ERROR : file1.txt: Couldn't move: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 ERROR : dest_dir/file1.txt: File.Rename error: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 ERROR : file1.txt: Dir.Rename error: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 INFO : //file1.txt: MOVE from 127.0.0.1:55875
2026/10/09 10:20:45 DEBUG : /file1.txt: OpenFile: flags=O_RDONLY, perm=----------
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: Open: flags=O_RDONLY
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: >Open: fd=dest_dir/file1.txt (r), err=<nil>
2026/10/09 10:20:45 DEBUG : /file1.txt: >OpenFile: fd=dest_dir/file1.txt (r), err=<nil>
2026/10/09 10:20:45 INFO : //file1.txt: PROPFIND from 127.0.0.1:55875
2026/10/09 10:20:45 INFO : //dest_dir/file1.txt: PROPFIND from 127.0.0.1:55876
2026/10/09 10:20:45 INFO : //dest_dir/: MKCOL from 127.0.0.1:55876
2026/10/09 10:20:45 ERROR : file1.txt: Couldn't move: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 ERROR : dest_dir/file1.txt: File.Rename error: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 ERROR : file1.txt: Dir.Rename error: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 INFO : //file1.txt: MOVE from 127.0.0.1:55875
2026/10/09 10:20:45 DEBUG : /file1.txt: OpenFile: flags=O_RDONLY, perm=----------
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: Open: flags=O_RDONLY
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: >Open: fd=dest_dir/file1.txt (r), err=<nil>
2026/10/09 10:20:45 DEBUG : /file1.txt: >OpenFile: fd=dest_dir/file1.txt (r), err=<nil>
2026/10/09 10:20:45 INFO : //file1.txt: PROPFIND from 127.0.0.1:55875
2026/10/09 10:20:45 INFO : //dest_dir/file1.txt: PROPFIND from 127.0.0.1:55876
2026/10/09 10:20:45 INFO : //dest_dir/: MKCOL from 127.0.0.1:55876
2026/10/09 10:20:45 ERROR : file1.txt: Couldn't move: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 ERROR : dest_dir/file1.txt: File.Rename error: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 ERROR : file1.txt: Dir.Rename error: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 INFO : //file1.txt: MOVE from 127.0.0.1:55875
2026/10/09 10:20:45 DEBUG : /file1.txt: OpenFile: flags=O_RDWR|O_CREATE|O_TRUNC, perm=-rw-rw-rw-
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: Open: flags=O_RDWR|O_CREATE|O_TRUNC
2026/10/09 10:20:45 DEBUG : dest_dir: Added virtual directory entry vAddFile: "file1.txt"
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: >Open: fd=dest_dir/file1.txt (w), err=<nil>
2026/10/09 10:20:45 DEBUG : /file1.txt: >OpenFile: fd=dest_dir/file1.txt (w), err=<nil>
2026/10/09 10:20:45 DEBUG : dest_dir: Added virtual directory entry vAddFile: "file1.txt"
2026/10/09 10:20:45 DEBUG : Local file system at root: File to upload is small (4 bytes), uploading instead of streaming
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: size = 4 OK
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: md5 = aa5ea07b7635132ac4fb1772b90665ae OK
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: Size and md5 of src and dst objects identical
2026/10/09 10:20:45 DEBUG : dest_dir: Added virtual directory entry vAddFile: "file1.txt"
2026/10/09 10:20:45 INFO : //file1.txt: PUT from 127.0.0.1:55877
2026/10/09 10:20:45 DEBUG : /file1.txt: OpenFile: flags=O_RDONLY, perm=----------
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: Open: flags=O_RDONLY
2026/10/09 10:20:45 DEBUG : dest_dir/file1.txt: >Open: fd=dest_dir/file1.txt (r), err=<nil>
2026/10/09 10:20:45 DEBUG : /file1.txt: >OpenFile: fd=dest_dir/file1.txt (r), err=<nil>
2026/10/09 10:20:45 INFO : //file1.txt: PROPFIND from 127.0.0.1:55877
2026/10/09 10:20:45 INFO : Signal received: terminated
2026/10/09 10:20:45 DEBUG : 6 go routines active
2026/10/09 10:20:45 NOTICE: Failed to webdav with 3 errors: last error was: rename root/file1.txt root/dest_dir/file1.txt: permission denied
2026/10/09 10:20:45 INFO : Exiting...Anything else?
No response
Activity
vfs: rollback file identity on backend rename failure
vfs: rollback file identity on backend rename failure
vfs: fixes corrupt file identity on backend rename failure