With NSSM in Windows 10 it can mount only "Read Only"

What is the problem you are having with rclone?

I need to use Rclone in background so I found that it can do it with NSSM.

And I installed Rclone service with NSSM but it seems that 'Mount' function works but it can only use with Read Only.

I thought this error is from command so I use same arguments with rclone mount ~~~~~~~ command in CMD and it works.

How can I solve this problem?

So it seems that this problem is from NSSM.

What is your rclone version (output from rclone version)

Rclone 1.55.1 Latest (2021-07-19)

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10 64bit Pro

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

SFTP

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

nssm install myNewDisk C:\rclone\rclone.exe "mount myNewDisk:/ X: --config C:\rclone\rclone.conf --allow-other --cache-dir=C:\Temp\rclonecache --dir-cache-time 15s --poll-interval 15s --log-level INFO --log-file C:\rclone\rclone-mount.log --vfs-read-chunk-size=32M --vfs-cache-mode full --vfs-write-back 5s --vfs-cache-max-size 200G --vfs-cache-max-age 15s --bwlimit-file 16M --buffer-size 16M --vfs-read-ahead 32M"

A log from the command from log file

The service rclone has been started.
2021/07/22 11:53:38 ERROR : myfolder/test.docx: WriteFileHandle: ReadAt: Can't read and write to file without --vfs-cache-mode >= minimal
2021/07/22 11:53:38 ERROR :  myfolder/test.docx: WriteFileHandle: Can't open for write without O_TRUNC on existing file without --vfs-cache-mode >= writes
2021/07/22 11:53:38 ERROR :  myfolder/test.docx: WriteFileHandle: ReadAt: Can't read and write to file without --vfs-cache-mode >= minimal
2021/07/22 11:53:38 ERROR :  myfolder/test.docx: WriteFileHandle: ReadAt: Can't read and write to file without --vfs-cache-mode >= minimal

You only have a snippet of the log and it seems to contradict your command you have listed.

Can you post a full debug log?

When I run it debug mode in log file. It shows me like this log.

quote="writingdeveloper, post:1, topic:25476"]

2021/07/22 13:59:43 DEBUG : rclone: Version "v1.56.0" starting with parameters ["C:\\rclone\\rclone.exe" "mount" "geomec:/" "X:" "--config" "C:\\rclone\\rclone.conf" "--allow-other" "--cache-dir=C:\\Temp\\rclonecache" "--dir-cache-time" "15s" "--poll-interval" "15s" "--log-level" "DEBUG" "--log-file" "C:\\rclone\\rclone-mount.log" "--vfs-read-chunk-size=32M" "--vfs-cache-mode" "full" "--vfs-write-back" "5s" "--vfs-cache-max-size" "200G" "--vfs-cache-max-age" "15s" "--bwlimit-file" "16M" "--buffer-size" "16M" "--vfs-read-ahead" "32M"]
2021/07/22 13:59:43 DEBUG : Creating backend with remote "geomec:/"
2021/07/22 13:59:43 DEBUG : Using config file from "C:\\rclone\\rclone.conf"
2021/07/22 13:59:43 DEBUG : abc@acb.co.kr:1001//: New connection 192.168.0.13:10956->175.113.245.205:1001 to "SSH-2.0-OpenSSH_7.4"
2021/07/22 13:59:43 NOTICE: --allow-other flag does nothing on Windows
2021/07/22 13:59:43 INFO  : abc@acb.co.kr:1001//: poll-interval is not supported by this remote
2021/07/22 13:59:43 DEBUG : vfs cache: root is "\\\\?\\C:\\Temp\\rclonecache\\vfs\\geomec"
2021/07/22 13:59:43 DEBUG : vfs cache: metadata root is "\\\\?\\C:\\Temp\\rclonecache\\vfs\\geomec"
2021/07/22 13:59:43 DEBUG : Creating backend with remote "\\\\?\\C:\\Temp\\rclonecache\\vfs\\geomec"
2021/07/22 13:59:43 DEBUG : fs cache: renaming cache item "\\\\?\\C:\\Temp\\rclonecache\\vfs\\geomec" to be canonical "//?/C:/Temp/rclonecache/vfs/geomec"
2021/07/22 13:59:43 DEBUG : fs cache: switching user supplied name "\\\\?\\C:\\Temp\\rclonecache\\vfs\\geomec" for canonical name "//?/C:/Temp/rclonecache/vfs/geomec"
2021/07/22 13:59:43 DEBUG : Saving config "md5sum_command" in section "geomec" of the config file
2021/07/22 13:59:43 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2021/07/22 13:59:43 DEBUG : Saving config "sha1sum_command" in section "geomec" of the config file
2021/07/22 13:59:43 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2021/07/22 13:59:43 DEBUG : 공유폴더: Removing directory
2021/07/22 13:59:43 DEBUG : Network mode mounting is disabled
2021/07/22 13:59:43 DEBUG : Mounting on "X:" ("geomec")
2021/07/22 13:59:43 DEBUG : abc@acb.co.kr:1001//: Mounting with options: ["-o" "attr_timeout=1" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=geomec"]
2021/07/22 13:59:43 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/07/22 13:59:43 DEBUG : sftp://abc@acb.co.kr:1001//: Init: 
2021/07/22 13:59:43 DEBUG : sftp://abc@acb.co.kr:1001//: >Init: 
2021/07/22 13:59:43 DEBUG : /: Statfs: 
2021/07/22 13:59:43 ERROR : sftp://abc@acb.co.kr:1001//: Statfs failed: your remote may not support About: failed to run "df -k /": Permission denied, please try again.
: Process exited with status 1
2021/07/22 13:59:43 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:8796093022207 Bfree:8796093022207 Bavail:8796093022207 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2021/07/22 13:59:43 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:43 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:43 DEBUG : /: Readlink: 
2021/07/22 13:59:43 DEBUG : /: >Readlink: linkPath="", errc=-40
2021/07/22 13:59:43 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:43 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:43 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:43 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:43 DEBUG : /: Opendir: 
2021/07/22 13:59:43 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/07/22 13:59:43 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2021/07/22 13:59:43 DEBUG : /: >Opendir: errc=0, fh=0x0
2021/07/22 13:59:43 DEBUG : /: Statfs: 
2021/07/22 13:59:43 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2021/07/22 13:59:43 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:43 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:43 DEBUG : /: Releasedir: fh=0x0
2021/07/22 13:59:43 DEBUG : /: >Releasedir: errc=0
2021/07/22 13:59:43 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:43 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:43 DEBUG : /: Opendir: 
2021/07/22 13:59:43 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/07/22 13:59:43 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2021/07/22 13:59:43 DEBUG : /: >Opendir: errc=0, fh=0x0
2021/07/22 13:59:43 DEBUG : /: Releasedir: fh=0x0
2021/07/22 13:59:43 DEBUG : /: >Releasedir: errc=0
2021/07/22 13:59:43 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:43 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:43 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:43 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:43 DEBUG : /: Opendir: 
2021/07/22 13:59:43 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/07/22 13:59:43 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2021/07/22 13:59:43 DEBUG : /: >Opendir: errc=0, fh=0x0
2021/07/22 13:59:43 DEBUG : /: Releasedir: fh=0x0
2021/07/22 13:59:43 DEBUG : /: >Releasedir: errc=0
2021/07/22 13:59:44 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:44 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:44 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:44 DEBUG : /: >Getattr: errc=0
2021/07/22 13:59:44 DEBUG : /: Opendir: 
2021/07/22 13:59:44 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/07/22 13:59:44 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2021/07/22 13:59:44 DEBUG : /: >Opendir: errc=0, fh=0x0
2021/07/22 13:59:44 DEBUG : /: Releasedir: fh=0x0
2021/07/22 13:59:44 DEBUG : /: >Releasedir: errc=0
2021/07/22 13:59:45 DEBUG : /공유폴더: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:45 DEBUG : /공유폴더: >Getattr: errc=0
2021/07/22 13:59:45 DEBUG : /공유폴더: Getattr: fh=0xFFFFFFFFFFFFFFFF
2021/07/22 13:59:45 DEBUG : /공유폴더: >Getattr: errc=0
2021/07/22 13:59:45 DEBUG : /공유폴더: Opendir: 
2021/07/22 13:59:45 DEBUG : /공유폴더: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2021/07/22 13:59:45 DEBUG : /공유폴더: >OpenFile: fd=공유폴더/ (r), err=<nil>
2021/07/22 13:59:45 DEBUG : /공유폴더: >Opendir: errc=0, fh=0x0
2021/07/22 13:59:45 DEBUG : /공유폴더: Releasedir: fh=0x0
2021/07/22 13:59:45 DEBUG : /공유폴더: >Releasedir: errc=0

[/quote]

hi,

  • make sure to run nssm as the same username as you are logged in as, not system user.
  • i use windows built-in task scheduler instead of nssm, as it can start any program and can do much more than nssm
  • --allow-other does nothing on windows....

NSSM setup that works for me

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