Cannot mount drive in powershell

#### What is the problem you are having with rclone?

\\
I am able to run most commands, including rclone sync; as well as use the rclone browser.
The ONLY trouble I am having is mounting the drives as a network location and mapped drive.
Originally trying to setup as a standard user, however trouble with admin profile also.
Would like to have these mounted for the standard user.
** edit *
Have successfully mounted a folder of gdrive (via Rclone browser) but still haven't success with root directory.
Need root otherwise need a mapped drive for every folder

What is correct way to run with admin privilege when operating as a standard user?

**edit I though I had this resolved

Unable to mount via powershell

PS C:\Windows\system32> rclone mount pcloud: t:
2022/08/09 16:27:05 NOTICE: pcloud root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
The service rclone has been started.

But nothing appears in windows explorer

Q: Is there a performance difference between mounting via powershell vs RcloneBrowser?
I intend to use the mapped drive to 2way sync large data sets

\\

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

\
PS C:\Windows\system32> rclone version
rclone v1.59.0

  • os/version: Microsoft Windows 10 Home 21H2 (64 bit)
  • os/kernel: 10.0.19044.1865 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.18.3
  • go/linking: static
  • go/tags: cmount
    PS C:\Windows\system32>

\\

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

\
gdrive
pcloud
\\

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

\
When I run these powershell returns "The service rclone has been started." but nothing shows in Windows explorer.

rclone mount gdrive1:/ z:
rclone mount gdrive1:/ z: --network-mode
rclone mount --vfs-cache-mode full gdrive1:/ Z:
rclone mount --vfs-cache-mode full gdrive1:/ Z: --fuse-flag --VolumePrefix=\server\share


where downloads is a folder on gdrive:

PS C:\rclone> rclone mount gdrive1\downloads: z: --network-mode
2022/08/09 14:04:08 ERROR : Local file system at //?/C:/rclone/gdrive1/downloads:: Statfs failed: failed to read disk usage: The system cannot find the path specified.
The service rclone has been started.
2022/08/09 14:04:19 ERROR : mountpoint "z:" didn't became available on mount - continuing anyway


PS C:\Windows\system32> rclone mount pcloud: t:
2022/08/09 16:27:05 NOTICE: pcloud root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream
The service rclone has been started.

But nothing appears in windows explorer

\\



#### The rclone config contents with secrets removed.  


\\\
[pcloud_rclone]
type = pcloud
hostname = eapi.pcloud.com
username = username@gmail.com
token = {"access_token":"WwgVZDnOTRY7wy","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"}

[gdrive1]
type = drive
scope = drive
token = {"access_token":"ya29.A0AVA6UTYIYg3mpgfw0163","token_type":"Bearer","refresh_token":"1//0gdW1Hw4e9tC1jMs","expiry":"2022-08-09T15:00:41.8975113+10:00"}
team_drive = 
\\\

A log from the command with the -vv flag

Paste  log here

\\\
PS C:\Windows\system32> rclone mount gdrive1: x: -vv
2022/08/09 13:34:12 DEBUG : rclone: Version "v1.59.0" starting with parameters ["C:\\rclone\\rclone.exe" "mount" "gdrive1:" "x:" "-vv"]
2022/08/09 13:34:12 DEBUG : Creating backend with remote "gdrive1:"
2022/08/09 13:34:12 DEBUG : Using config file from "C:\\rclone\\rclone.conf"
2022/08/09 13:34:13 DEBUG : Google drive root '': 'root_folder_id = 0AGvmE8FRbUk9PVA' - save this in the config to speed up startup
2022/08/09 13:34:13 DEBUG : fs cache: renaming cache item "gdrive1:" to be canonical "gdrive1:"
2022/08/09 13:34:13 DEBUG : Network mode mounting is disabled
2022/08/09 13:34:13 DEBUG : Mounting on "x:" ("gdrive1")
2022/08/09 13:34:13 DEBUG : Google drive root '': Mounting with options: ["-o" "attr_timeout=1" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=gdrive1"]
2022/08/09 13:34:13 DEBUG : Google drive root '': Init:
2022/08/09 13:34:13 DEBUG : Google drive root '': >Init:
2022/08/09 13:34:13 DEBUG : /: Statfs:
2022/08/09 13:34:13 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:3932160 Bfree:1338308 Bavail:1338308 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/08/09 13:34:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/08/09 13:34:13 DEBUG : /: >Getattr: errc=0
2022/08/09 13:34:13 DEBUG : /: Readlink:
2022/08/09 13:34:13 DEBUG : /: >Readlink: linkPath="", errc=-40
2022/08/09 13:34:13 DEBUG : /: Getxattr: name="non-existant-a11ec902d22282d3b00"
2022/08/09 13:34:13 DEBUG : /: >Getxattr: errc=-40, value=""
2022/08/09 13:34:13 DEBUG : /: Statfs:
The service rclone has been started.
2022/08/09 13:34:13 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:3932160 Bfree:1338308 Bavail:1338308 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2022/08/09 13:34:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/08/09 13:34:13 DEBUG : /: >Getattr: errc=0
2022/08/09 13:34:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/08/09 13:34:13 DEBUG : /: >Getattr: errc=0
2022/08/09 13:34:13 DEBUG : /: Opendir:
2022/08/09 13:34:13 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/08/09 13:34:13 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/08/09 13:34:13 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/08/09 13:34:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/08/09 13:34:13 DEBUG : /: >Getattr: errc=0
2022/08/09 13:34:13 DEBUG : /: Releasedir: fh=0x0
2022/08/09 13:34:13 DEBUG : /: >Releasedir: errc=0
2022/08/09 13:34:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/08/09 13:34:13 DEBUG : /: >Getattr: errc=0
2022/08/09 13:34:13 DEBUG : /: Opendir:
2022/08/09 13:34:13 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/08/09 13:34:13 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/08/09 13:34:13 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/08/09 13:34:13 DEBUG : /: Releasedir: fh=0x0
2022/08/09 13:34:13 DEBUG : /: >Releasedir: errc=0
2022/08/09 13:34:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/08/09 13:34:13 DEBUG : /: >Getattr: errc=0
2022/08/09 13:34:13 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/08/09 13:34:13 DEBUG : /: >Getattr: errc=0
2022/08/09 13:34:13 DEBUG : /: Opendir:
2022/08/09 13:34:13 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/08/09 13:34:13 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/08/09 13:34:13 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/08/09 13:34:13 DEBUG : /: Releasedir: fh=0x0
2022/08/09 13:34:13 DEBUG : /: >Releasedir: errc=0
\\\

``

Check out:

rclone mount

windows maintains two separate lists of mapped drives for a give username

  1. mapped drives for command prompts with admin privileges
  2. mapped drives for command prompts without admin privileges.

if you run a rclone mount with admin privileges.
then windows explorer, which runs without admin privileges, will not see the mount.
one workaround is to mount to a folder, not a dir, tho that is not what you want.

Thanks asdffdsa for reply.
Your explanation makes sense.
I can get it to work via Rclone Browser, just not cmd, so will stick with browser as the solution

i tried mounting a folder "TEST" but it didn't work. Any thoughts?
started CMD (as admin)
C:\Windows\system32>rclone mount --vfs-cache-mode full "pcloud:TEST" x: --network-mode
The service rclone has been started.

However, nothing shows in the Explorer, and typing x:\ in brings up an error

windows error

perhaps open a command prompt with admin priv and try dir x:

I think it would help a lot if we can get you into the non-Admin PowerShell, so let us see it we can easily fix that.

Try pressing the Windows key + X, like described here:

Do you see the 2 entries?

image

Hi

I only use powershell as Admin because it doesn't work as local

not sure how to do this

User account

As mentioned in the mount documentation, mounted drives created as Administrator are not visible to other accounts, not even the account that was elevated as Administrator. By running the mount command as the built-in SYSTEM user account, it will create drives accessible for everyone on the system. Both scheduled task and Windows service can be used to achieve this.

NOTE: Remember that when rclone runs as the SYSTEM user, the user profile that it sees will not be yours. This means that if you normally run rclone with configuration file in the default location, to be able to use the same configuration when running as the system user you must explicitely tell rclone where to find it with the --config option, or else it will look in the system users profile path (C:\Windows\System32\config\systemprofile). To test your command manually from a Command Prompt, you can run it with the PsExec utility from Microsoft's Sysinternals suite, which takes option -s to execute commands as the SYSTEM user.


I copied rclone.conf to systemprofile folder but still can't figure out mounting (newbie)



Issue appears to be unable to easily mount via powershell when a local user.
rclone browser is easy as a local user, but creates an appdata issue if syncing large file set

maybe simplest option is to figure out how to save the appdata elsewhere (other than C drive) or just temp
I have another sync which is much larger than the 40GB i tested on pcloud which will fill my C drive up completely

Seems like rclone.exe is placed in a folder in the PATH of your Admin and that isn't included in the PATH of your local user. Try

./rclone version 

in the folder where rclone is placed.

Tip: Navigate to the rclone folder in Explorer and then type "powershell" in the addressbar, then PowerShell opens in that folder :slightly_smiling_face:

So is rclone and it also has a GUI if you like that you can activate like this (from the rclone folder)

./rclone rcd --rc-web-gui

and read more about here: https://rclone.org/gui/

I can mount via powershell when logged in as a user with admin privilege.

So as asdffdsa advised earlier in the tread, its an issue with Standard user not having the elevated permissions.

Cool tip :grinning:

I have rclone installed in C:
Should I have it elsewhere?

PS C:\rclone> ./rclone version
rclone v1.59.0

  • os/version: Microsoft Windows 10 Home 21H2 (64 bit)
  • os/kernel: 10.0.19044.1889 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.18.3
  • go/linking: static
  • go/tags: cmount
    PS C:\rclone>

I think it is fine as long as your local user has permissions, I have it in a folder under my local user.

As local user I can open the folder :+1:

Perfect, and see your config?

./rclone config show

used default setting and unable to mount (show in windows explorer)

I'll have to sort out either elevated permissions via powershell or just use rclone browser and manually delete the appdata

when using the GUI:
PS C:\rclone> ./rclone rcd --rc-web-gui
2022/08/16 19:00:38 ERROR : Error reading tag file at C:\Users\username\AppData\Local\rclone\webgui\tag
2022/08/16 19:00:38 NOTICE: A new release for gui (v2.0.5) is present at https://github.com/rclone/rclone-webui-react/releases/download/v2.0.5/currentbuild.zip
2022/08/16 19:00:38 NOTICE: Downloading webgui binary. Please wait. [Size: 4763452, Path : C:\Users\username\AppData\Local\rclone\webgui\v2.0.5.zip]
2022/08/16 19:00:41 NOTICE: Unzipping webgui binary
2022/08/16 19:00:41 NOTICE: Serving Web GUI
2022/08/16 19:00:41 NOTICE: Serving remote control on http://localhost:5572/
The service rclone has been started.

I'm just a newbie so I'm at my limit of understanding, however I can make do with using rclone browser or use rclone when logged in as admin profile