Mounted SharePoint+Onedrive doesn't update directory listing when files are deleted

What is the problem you are having with rclone?

I have a SharePoint volume mounting with OneDrive. When I delete a file on a remote system, the directory listing for that folder (where the file was) does not get updated in my mounted directory. That is, the file I deleted remotely is still listed in the directory.

Even if I wait for 5 minutes (the default dir cache time), the file is still present, even though it's removed from the SharePoint web interface and from my remote system.

If I trigger another change in that directory by creating another file or directory, then the mounted directory listing is refreshed shortly after (maybe in a minute).

This happens with both the latest beta and stable versions and on macOS and Linux.

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

root@localhost:~# rclone version
rclone v1.70.0-beta.8736.d4fd93e7f
- os/version: debian 11.11 (64 bit)
- os/kernel: 5.10.0-30-cloud-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.24.3
- go/linking: static
- go/tags: none

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

SharePoint+OneDrive

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

rclone mount --log-file=/var/log/rclone.log -vv --vfs-cache-mode=writes mojo: /mnt/FileVault --daemon

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

[mojo]
type = onedrive
client_id = XXX
client_secret = XXX
tenant = XXX
token = XXX
drive_id = XXX
drive_type = documentLibrary

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

2025/05/12 16:45:05 DEBUG : rclone: Version "v1.70.0-beta.8736.d4fd93e7f" starting with parameters ["rclone" "mount" "--log-file=/var/log/rclone.log" "-vv" "--vfs-cache-mode=writes" "mojo:" "/mnt/FileVault/" "--daemon"]
2025/05/12 16:45:05 DEBUG : Creating backend with remote "mojo:"
2025/05/12 16:45:05 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2025/05/12 16:45:05 DEBUG : rclone: Version "v1.70.0-beta.8736.d4fd93e7f" finishing with parameters ["/usr/bin/rclone" "mount" "--log-file=/var/log/rclone.log" "-vv" "--vfs-cache-mode=writes" "mojo:" "/mnt/FileVault/" "--daemon"]
2025/05/12 16:45:05 DEBUG : rclone: Version "v1.70.0-beta.8736.d4fd93e7f" starting with parameters ["/usr/bin/rclone" "mount" "--log-file=/var/log/rclone.log" "-vv" "--vfs-cache-mode=writes" "mojo:" "/mnt/FileVault/" "--daemon"]
2025/05/12 16:45:05 DEBUG : Creating backend with remote "mojo:"
2025/05/12 16:45:05 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2025/05/12 16:45:05 DEBUG : OneDrive root '': Next delta token is: NDslMjM0OyUyMzE7MzthZmVlMDJiNS01YTVhLTRkZGQtYmYxMy1kMzc3OWNjOWM0MzY7NjM4ODI2NjUxMDU4ODcwMDAwOzEzMjEyMzk0NzA7JTIzOyUyMzslMjMwOyUyMw
2025/05/12 16:45:05 DEBUG : OneDrive root '': vfs cache: root is "/root/.cache/rclone"
2025/05/12 16:45:05 DEBUG : OneDrive root '': vfs cache: data root is "/root/.cache/rclone/vfs/mojo"
2025/05/12 16:45:05 DEBUG : OneDrive root '': vfs cache: metadata root is "/root/.cache/rclone/vfsMeta/mojo"
2025/05/12 16:45:05 DEBUG : Creating backend with remote ":local,encoding='Slash,Dot',links=false:/root/.cache/rclone/vfs/mojo/"
2025/05/12 16:45:05 DEBUG : :local: detected overridden config - adding "{8un-i}" suffix to name
2025/05/12 16:45:05 DEBUG : fs cache: renaming cache item ":local,encoding='Slash,Dot',links=false:/root/.cache/rclone/vfs/mojo/" to be canonical ":local{8un-i}:/root/.cache/rclone/vfs/mojo"
2025/05/12 16:45:05 DEBUG : Creating backend with remote ":local,encoding='Slash,Dot',links=false:/root/.cache/rclone/vfsMeta/mojo/"
2025/05/12 16:45:05 DEBUG : :local: detected overridden config - adding "{8un-i}" suffix to name
2025/05/12 16:45:05 DEBUG : fs cache: renaming cache item ":local,encoding='Slash,Dot',links=false:/root/.cache/rclone/vfsMeta/mojo/" to be canonical ":local{8un-i}:/root/.cache/rclone/vfsMeta/mojo"
2025/05/12 16:45:05 INFO  : OneDrive root '': vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2025/05/12 16:45:05 CRITICAL: Fatal error: failed to mount FUSE fs: directory already mounted, use --allow-non-empty to mount anyway: /mnt/FileVault

I'm not sure what that CRITICAL log entry is about, the share IS mounted and updates are reflected (aside from deletions) in a timely manner.

hi, unless 1000% sure, should not over-mount, should not use --allow-non-empty

Oh shoot! It was because I had a systemd service that was automounting my share immediately when I unmounted it with fusermount3 -u /mnt/FileVault, so my command line rclone command was indeed trying to mount on an already mounted directory.

Sorry for such a boneheaded error, my mount systemd service had a much longer dir-cache-time.

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