Issue With RClone Mount and Resilio Sync

Hey All,

I'm pretty new to RClone and I've run into an issue I cannot seem to get past. I have a mount setup to GDrive on a Windows system.

Everything that needs access to the mount works, except Resilio sync. For some reason it's unable to scan the files.

Resilio's logs report this error for each file: GetPathOnDiskByHandle failed, error - 1005

I don't see anything obvious in the RClone logs. For each error in the sync log there is this in the rclone log.

2020/03/03 21:34:21 DEBUG : /DIR: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2020/03/03 21:34:21 DEBUG : /DIR/XXXX: Getattr: fh=0xFFFFFFFFFFFFFFFF
2020/03/03 21:34:21 DEBUG : /DIR >OpenFile: fd=DIR/ (r), err=<nil>
2020/03/03 21:34:21 DEBUG : /DIR: >Opendir: errc=0, fh=0x2
2020/03/03 21:34:21 DEBUG : /DIR/XXXX >Getattr: errc=0
rclone[TID=2a1c]: FFFF8083119C7610: <<Create IoStatus=0[1] UserContext=0000000000000000:00000000028403D0, GrantedAccess=80, FileInfo={FileAttributes=10, ReparseTag=0, AllocationSize=0:0, FileSize=0:0, CreationTime=2019-12-20T12:42:14.826Z, LastAccessTime=2019-12-20T12:42:14.826Z, LastWriteTime=2019-12-20T12:42:14.826Z, ChangeTime=2019-12-20T12:42:14.826Z, IndexNumber=0:5}

I'm launching my mount with this command line.

rclone mount --allow-other --dir-cache-time 72h --drive-chunk-size 64M --log-level INFO --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off media: X: --config C:\Users\Administrator\.config\rclone\rclone.conf --vfs-cache-mode writes --log-file C:\rclone\logs\rclone.log --log-level DEBUG --file-perms 0777 --allow-root --debug-fuse --fuse-flag -d

Can anyone point me in a direction to troubleshoot this further? I'm not seeing anything that is jumping out at me.

Error 1005 is access denied, interestingly enough...

Do you think there might be some permissions problem? Is Resilio running as a different user to the mount?

If you could post a full log from rclone that would be helpful.

Rclone and sync are running as the same user.

Here's a clean log, directly after launching Resilio.

I changed both RClone and Resilio to run as System. Same result.

The weird thing is, Resilio creates the .sync folder on the share so it clearly has write access.

There are no errors in that log!

But they are both running as Administrator...

Note these caveats:

I wonder if Resilio has dropped some of the administrator privs.

In general Bill Ziss (the WinFSP author) advises against running WinFSP as Administrator for reasons I don't fully understand, so maybe that is something you could try since

  • the error isn't coming from rclone (no errors in the log)
  • the error is a permissions error (-10005)

are you sure both rclone and resilio are running as system user?
there seem to be a few way to run resilio as system user, which method are you using?

i noticed that in your command, you have both, is that intentional?
--log-level INFO
--log-level DEBUG

you might try --vfs-cache-mode full and see what happens?

maybe it is permission issue
have you tried?

"GetPathOnDiskByHandle failed, error - 1005"
i noticed, in resilio forum, that you are getting additional errors, hopefully resilio can understand the errors generated from their product.

I tested with a non-admin local user, System User via NSSM, and running with the Administrator Account. Same result with all of them.

there is another way to run it as a service

The log level was my error, didn't realize I had it there twice.

I tried both --file-perms and --dir-perms. Same result.

Also tried --vfs-cache-mode full. Same issue.

I'm stumped at this point. I'm assuming it's on Resilio end but I'm not getting responses on their forum.

Current args:

rclone mount --allow-other --dir-cache-time 72h --drive-chunk-size 64M --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit off media: X: --config C:\.config\rclone\rclone.conf --log-file C:\rclone\logs\rclone.log --log-level DEBUG --vfs-cache-mode full --dir-perms 0777 --file-perms 0777

I did try that. Ran Rclone with NSSM and ran Sync with it's own Service option. Tried both with System account and local non-admin user account.

yeah, you posted on their forum two days ago and still not a single reply.

but as you can see, that is not the case with rclone forum! :wink:

Interesting result. If I drop --vfs-cache-mode Sync reports it doesn't have permission to write to the drive.

Screenshot from 2020-03-05 17-27-59

[2020-03-05 17:25:44.916] MUTEX[\?\X:\TV]: unable to read from mutex file, error 5
[2020-03-05 17:25:44.916] CHECK_MUTEX_JOB: check failed with error : 101

What a frustrating issue. It's the one thing keeping my from making this server live.

Another interesting tid-bit. I can create a brand new directory via Sync's interface instead of adding an existing. It is able to create the directory but yet it still complains about write permissions once the directory is added.

So you know if Resilio is creating ACLs on the directory or something like that? Rclone doesn't support ACLs.

i did not some testing lastnight.
it seems that resiliio needs to lookup window acl on the files to be synced.
and as you mentioned rclone does not support acl.

what i tried to do was create a mount such as
and tell resilio to put the .sync folder in b:\mountest, hoping the resillio would sync the subfolder b:\mountest\mount.
but that did not work.

another thing i tried but did not work.
i created a net share of the mount, hoping that the net share would create a set of acl.

1 Like

Thank you for testing.

That's a bummer to hear. So if I'm understanding correctly, it appears the Sync simply isn't compatible with Rclone due to it's use of of ACLs?

does this look good?


Add the 'Files' Column and see if it picked up any files in the directory. If it's working it should have been able to scan whatever is in the folder.

it seems that winfsp is compatible with windows acl.
i guess rclone is not.

i look at the command rclone uses to connect to winfsp

%rcmd% mount wasabieast2:handbrake01 b:\mount\mountx -vv --log-file=%logx% --vfs-cache-mode=writes --allow-other --option="uid=user01"

2020/03/06 14:15:11 DEBUG : S3 bucket handbrake01: Mounting with options: ["-o" "fsname=wasabieast2:handbrake01" "-o" "subtype=rclone" "-o" "max_readahead=131072" "-o" "attr_timeout=1" "-o" "atomic_o_trunc" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=wasabieast2 handbrake01" "-o" "allow_other" "-o" "uid=user01"]

it seems that rclone always does a uid=-1, and i am not sure what -1 implies?
but i tried to add my own, not sure if i did it correctly uid=user01
but if i did override the uid correctly, why are there two of them, rclone's and mine?

winfsp will accept the following,
-o uid=UID and -o gid=GID options, but accept Windows user and groups names.

what is the difference between these two flags?

--fuse-flag stringArray                  Flags or arguments to be passed direct to libfuse/WinFsp


--option stringArray                     Option for libfuse/WinFsp