No file creation allowed in OneDrive rclone service

Hi, thanks to @LeoW help I just created with Rclone and NSSM a windows service to mount a Microsoft OneDrive drive at system startup.

What is the problem you are having with rclone?

Inside the drive I can paste files or create a new folder but windows explorer doesn't let me create new files... What can it depend on? Even in context menu "New" option inside the drive main folder I only see "Folder". No new txt file, word file and so on as usual.
Rclone remote to Onedrive was created following default settings.

Nssm was set up as follows:

Service name: MyOnedriveService
Application path: C:\ESEGUIBILI\rclone\rclone.exe
Startup directory: C:\ESEGUIBILI\rclone
Arguments:

--config C:\Users\frenk\AppData\Roaming\rclone\rclone.conf --log-file C:\Users\frenk\rclone-log.txt mount Onedrive: O: --vfs-cache-mode full

Display name: MyOnedriveService
Startup type: Automatic
Logon as: Local system account
Process priority: High

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

rclone v1.64.0
- os/version: Microsoft Windows 11 Pro 22H2 (64 bit)
- os/kernel: 10.0.22621.2283 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.1
- go/linking: static
- go/tags: cmount

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

Microsoft OneDrive

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

[Onedrive]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

welcome to the forum,

you should have a few options:

  • run rclone as the same username as you are logged in.
    might try Logon as: frenk
  • run rclone as system user, which is what you are doing, then, to the mount command, add something like
    -o UserName=frenk -o GroupName="users" -o FileSecurity="D:P(A;;FA;;;WD)"
    and let me know if that works for you, as forgot that i was asked to add that to the rclone docs.
1 Like

Great! Solved on the first try! It was enough to add the first thing you suggested: -o UserName=frenk then the "arguments" of NSSM became:

--config C:\Users\frenk\AppData\Roaming\rclone\rclone.conf --log-file C:\Users\frenk\rclone-log.txt mount Onedrive: O: --vfs-cache-mode full -o UserName=frenk

and now I can create any kind of file inside the drive.
Thank you very much! :raised_hands: :clap: :raised_hands: :clap: :raised_hands:

1 Like

welcome,

about the nssm, are you still using Logon as: Local system account

Yes, no other changes. Logon is still on "Local system account"

why login as system user, which has total power of your entire computer instead of running as limited user frenk?

I was recommended this way by LeoW who helped me on the FreeFileSync forum. My problem is that I have to use FreeFileSync with administrator permissions cause that's the only way to get it to sync some C:/ folders; but I wanted to use it with rclone too. Unfortunately a "normally" mounted rclone drive is invisible to FFS runned as administrator, and a rclone drive mounted with administrator permissions is seen by FFS but disappear from Windows Explorer.... Hence the need - I think - for that kind of logon in NSSM. Perhaps. But it works.
Do you think it might cause problems?

rclone mount to a folder, not a dir and that problem goes away
or
run an instance of windows explorer with admin privileges

rclone mount remote: b:\rclone\mount\remote

I would prefer to have OneDrive mounted as a drive instead of a folder, but in case there are problems I can certainly agree to have it mounted as you say. But I honestly can't see where the problem is. Even if this windows service has life and death power over my pc what can it do wrong? It is programmed to mount a drive and that's it.

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