Issues with permissions using with rclone mount

I’m trying to use syncthing as a docker in unraid to do 2 way sync to my Onedrive account which is mounted via rclone.

It’s finding the folder fine, and loading some .tmp files in there (upto a few 100kb), but then throwing up sync errors (both illegal seek & operation not permitted).

An example of the errors:

2020-07-19 21:36:57 Puller (folder “5870” (5870), item “DSC_3452.JPG”): truncate /onedrive/pictures/.syncthing.DSC_3452.JPG.tmp: operation not permitted 2020-07-19 21:37:00 Puller (folder “5870” (5870), item “DSC_3453.JPG”): save: write /onedrive/pictures/.syncthing.DSC_3453.JPG.tmp: illegal seek

I’ve tried a load of different rclone configs e.g. changing the uid to match the syncthing docker uid etc but I continue to get the same errors. I’ve tried with & without “ignore permissions” set, with no difference. I can access & write to the rclone mount in other dockers fine.

Due to what I’ve tried, I’m thinking this is an issue on the syncthing side, rather than rclone (as the mount works otherwise).

Any thoughts/ideas on how to resolve?

I don’t think this will work, as it’s not a real filesystem and probably lacks sensible semantics that syncthing requires.

That was my worry unfortunately. I know it’s s little bit of a bodge of systems, but it’s the best/easiest route I could find to do 2 way sync, and I thought it might work, as the rclone mount is still seen within Unraid as a standard folder, just with a different file system.

It may look like a filesystem but apparently it doesn’t allow truncate or (some) seek operations, so it’s not “enough” of a filesystem for Syncthing’s purposes. Leaky abstractions, etc.

1 Like

The rclone mount command has a –vfs-cache-mode switch that controls how the virtual file system responds. Check out https://rclone.org/commands/rclone_mount/#file-caching.

If you aren’t already doing so, I suggest you mount the directory with –vfs-cache-mode writes set. This is claimed to support all normal file system operations, including truncate and seek. There is also a full option that may be worth trying if the writes setting doesn’t help.

3 Likes

Thanks all.

After Calmh mentioned it’s an issue with the filesystem, I went away and looked into rclone more, and found the vfs-cache-mode variable in rclone. I’ve sent this to write, and so far it seems to have resolved my issues, and the sync is working well.

2 Likes

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