Files (docx, xlsx ... Office files) are deleted in SharePoint after modification (mounted drive)

What is the problem you are having with rclone ?

(This message is translated)

Hello,

I use Rclone to mount a SharePoint library as a drive in Windows File Explorer. My goal is to be able to open, edit, and save documents, with the changes properly reflected on SharePoint. I would like to use Rclone in a professional environment as a free alternative to ZeeDrive (which works but is a paid solution).

Problem:
When I modify and save an Office document (Word, Excel, etc.), the file disappears from SharePoint—it is moved to the recycle bin, including the changes. On the Rclone side, the file still appears in the mounted drive (probably due to caching?).
I’ve tested mounting the drive using both the "OneDrive" and "WebDAV" backends. Both mount successfully, but the problem persists in both cases. Other file types (such as .txt) do not seem to be affected.

My questions:

  • Is this a bug?
  • Is Rclone intended to support this kind of workflow?
  • Is there an alternative method or configuration to achieve what I want (a workflow similar to ZeeDrive)?

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

rclone v1.69.3

  • os/version: Microsoft Windows 11 Pro 24H2 24H2 (64 bit)
  • os/kernel: 10.0.26100.4061 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.24.3
  • go/linking: static
  • go/tags: cmount

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> Yes

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

SharePoint

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

I don't have a problem with any particular command.

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

[SP-RI]
type = onedrive
token = XXX
drive_id = XXX
drive_type = documentLibrary

[SP-RI-Webdav]
type = webdav
url = https://XXX.sharepoint.com/sites/ABC/ZZZ
vendor = sharepoint
user = XXX
pass = XXX

Both configurations work. To mount them on the explorer, I use a Powershell script like this one :

# Mount virtual drive O:
Start-Process -WindowStyle Hidden -FilePath "C:\Rclone\rclone.exe" -ArgumentList 'mount SP-RI: O: --vfs-cache-mode full --vfs-cache-max-size 2G --vfs-cache-max-age 24h --cache-dir "C:\Rclone\caches\XXX" --volname "XXX - RI" --links'

The mounted drive "Onedrive conf = [SP-RI]" or "Webdav conf = [SP-RI-Webdav]" works, i can access the files without any problems. It's only when saving a modified Office file that I have a problem.

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

I'm not sure where to use the -vv flag in my configuration. Could you tell me at what point in the setup I should apply this option? I'd be happy to upload the logs.

x

Hi Lorrain,

rclone should not be removing the files, that is not expected behaviour.

There is this from the docs, which might be a good workaround for you: Microsoft OneDrive.

There is also this issue from github which is similar, maybe worth a read through:

As for where to put the --vv, you can just add it at the end of your command.

e.g. --links --vv'

Hello Edcw,

I tried using the following parameter:

--backup-dir SP-RI:rclone-backup-dir

Unfortunately, I’m still experiencing the same issue.

I also tried the options suggested in issue #8545:

--onedrive-upload-cutoff 4M
--streaming-upload-cutoff 4M

However, using these parameters prevents my drive from mounting.

Additionally, adding --vv at the end of ... --links --vv' also causes the mount to fail, and I don’t understand why. Here the full command:

# Mount virtual drive O:
Start-Process -WindowStyle Hidden -FilePath "C:\Rclone\rclone.exe" -ArgumentList 'mount SP-RI: O: --vfs-cache-mode full --vfs-cache-max-size 2G --vfs-cache-max-age 24h --cache-dir "C:\Rclone\caches\SP-RI" --backup-dir SP-RI:rclone-backup-dir --volname "SP- RI" --links --vv'

I will try to explain the behavior I’m experiencing using images.

First, here's the PowerShell script used to mount the drive with the parameter --backup-dir XXX-RI:rclone-backup-dir:

# Mount virtual drive O:
Start-Process -WindowStyle Hidden -FilePath "C:\Rclone\rclone.exe" -ArgumentList 'mount SP-RI: O: --vfs-cache-mode full --vfs-cache-max-size 2G --vfs-cache-max-age 24h --cache-dir "C:\Rclone\caches\SP-RI" --backup-dir SP-RI:rclone-backup-dir --volname "SP- RI" --links'

If I run this script, my drive mounts successfully, and I can browse the files without any issues:


As you can see in the following screenshot, I can access the files both through SharePoint Online and the Rclone-mounted virtual drive.

Now, if I open the Word document "Rclone-Forum-Test.docx" locally and start making changes, we can see that a cache file is generated and appears to "sync" on both SharePoint Online and the mounted virtual drive.

And now, if I close the document while saving the changes, the cache file is deleted on both sides, but we can also see that the Word document remains on the mounted drive (likely still in cache), while it disappears from SharePoint Online.

In fact, if I go to the SharePoint library recycle bin, we can see that Rclone attempts to write the file multiple times, but it consistently ends up in the recycle bin:

So here is my issue. This problem only occurs with Office documents (.docx, .xlsx, etc.). For example, with the test.txt file, I don’t encounter this issue. The tests were performed using the following configuration:

[SP-RI]
type = onedrive
token = XXX
drive_id = XXX
drive_type = documentLibrary

With the webdav configuration:

[SP-RI-Webdav]
type = webdav
url = https://XXX.sharepoint.com/sites/ABC/ZZZ
vendor = sharepoint
user = XXX
pass = XXX

The files online and locally were "out of sync" when I used the parameter --backup-dir SP-RI-Webdav:rclone-backup-dir.
Thank you in advance for your help. I remain available to provide further details.

Hello,

Is anyone else experiencing the same issue as me?

Thanks in advance for your help.

Hello,

Is anyone else experiencing the same issue as me?

Thanks in advance for your help.

You are missing a debug log file.

Add -vv on your command you can see exactly what rclone is doing.

Also with OneDrive, you are missing:

Microsoft OneDrive

Hi @Animosity022

When I use '--vv' in my script, the virtual drive simply doesn't mount. I've tried typing the command directly into CMD and this time I actually get a result.

When I perform the operations in my reply (higher up in the subject), I observe the following with the document named “Document33.docx” (Same operations performed as the document “Rclone-Forum-Test.docx” :

2025/06/10 13:20:37 DEBUG : ABC/Test Rclone/Document33.docx: vfs cache: starting upload
2025/06/10 13:20:37 DEBUG : ABC/Test Rclone/Document33.docx: Starting multipart upload
2025/06/10 13:20:37 DEBUG : ABC/Test Rclone/Document33.docx: Uploading segment 0/19469 size 19469
2025/06/10 13:20:38 DEBUG : ABC/Test Rclone/Document33.docx: quickxor = 00898dfe61aea91020eda9b11e591c7aXXXXXXXX (Local file system at //?/C:/Rclone/caches/SP-RI-5/vfs/SP-RI)
2025/06/10 13:20:38 DEBUG : ABC/Test Rclone/Document33.docx: quickxor = a198e521d36e45831daa97d371ab1403XXXXXXXX (OneDrive root '')
2025/06/10 13:20:38 ERROR : ABC/Test Rclone/Document33.docx: corrupted on transfer: quickxor hashes differ src(Local file system at //?/C:/Rclone/caches/SP-RI-5/vfs/SP-RI) "00898dfe61aea91020eda9b11e591c7aXXXXXXXX" vs dst(OneDrive root '') "a198e521d36e45831daa97d371ab1403XXXXXXXX"
2025/06/10 13:20:38 INFO  : ABC/Test Rclone/Document33.docx: Removing failed copy
2025/06/10 13:20:39 ERROR : ABC/Test Rclone/Document33.docx: vfs cache: failed to upload try #3, will retry in 40s: vfs cache: failed to transfer file from cache to remote: corrupted on transfer: quickxor hashes differ src(Local file system at //?/C:/Rclone/caches/SP-RI-5/vfs/SP-RI) "00898dfe61aea91020eda9b11e591c7aXXXXXXXX" vs dst(OneDrive root '') "a198e521d36e45831daa97d371ab1403XXXXXXXX"
2025/06/10 13:21:19 DEBUG : ABC/Test Rclone/Document33.docx: vfs cache: starting upload
2025/06/10 13:21:19 DEBUG : ABC/Test Rclone/Document33.docx: Starting multipart upload
2025/06/10 13:21:19 DEBUG : ABC/Test Rclone/Document33.docx: Uploading segment 0/19469 size 19469
2025/06/10 13:21:20 DEBUG : ABC/Test Rclone/Document33.docx: quickxor = 00898dfe61aea91020eda9b11e591c7aXXXXXXXX (Local file system at //?/C:/Rclone/caches/SP-RI-5/vfs/SP-RI)
2025/06/10 13:21:20 DEBUG : ABC/Test Rclone/Document33.docx: quickxor = a198e521d36e45831daa97d371ab1403XXXXXXXX (OneDrive root '')
2025/06/10 13:21:20 ERROR : ABC/Test Rclone/Document33.docx: corrupted on transfer: quickxor hashes differ src(Local file system at //?/C:/Rclone/caches/SP-RI-5/vfs/SP-RI) "00898dfe61aea91020eda9b11e591c7aXXXXXXXX" vs dst(OneDrive root '') "a198e521d36e45831daa97d371ab1403XXXXXXXX"
2025/06/10 13:21:20 INFO  : ABC/Test Rclone/Document33.docx: Removing failed copy
2025/06/10 13:21:20 ERROR : ABC/Test Rclone/Document33.docx: vfs cache: failed to upload try #4, will retry in 1m20s: vfs cache: failed to transfer file from cache to remote: corrupted on transfer: quickxor hashes differ src(Local file system at //?/C:/Rclone/caches/SP-RI-5/vfs/SP-RI) "00898dfe61aea91020eda9b11e591c7aXXXXXXXX" vs dst(OneDrive root '') "a198e521d36e45831daa97d371ab1403XXXXXXXX"
2025/06/10 13:21:25 DEBUG : OneDrive root '': Checking for changes on remote

I use the command :

rclone.exe mount SP-RI: O: --vfs-cache-mode full --vfs-cache-max-size 2G --vfs-cache-max-age 24h --cache-dir "C:\Rclone\caches\SP-RI-5" --backup-dir SP-RI:rclone-backup-dir --volname "ABC - RI" --links --vv

If you look at my answer to the topic above, you'll see the behavior I'm observing with the test file.

Thank you in advance for your help. I remain available to provide further details.

Again, please see:

The errors are in the log:

@Animosity022

Sorry, the documentation link I was opening didn't display the heading just above “Replacing/deleting existing files on Sharepoint gets ”item not found" ...

Indeed, after multiples tests and checks, adding the --ignore-checksum --ignore-size parameters fixes my problem.

The full command:

rclone.exe mount SP-RI: O: --vfs-cache-mode full --vfs-cache-max-size 2G --vfs-cache-max-age 24h --cache-dir "C:\Rclone\caches\SP-RI-Test10" --backup-dir SP-RI-Test10:rclone-backup-dir --volname "ABC - RI" --links --ignore-checksum --ignore-size

Thanks for the help, i close this subject.

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