Rclone S3 mount not working on Windows EC2 machine startup

What is the problem you are having with clone?

I'm able to mount S3 as a file system in windows by manually triggering a script, Im trying to automate it by running the script on EC2 instance startup using Task Scheduler

When the instance starts up, the mount is not showing as expected but in the task scheduler it is showing the script is running

When I manually run the task in Task Scheduler by selecting the option as "Run only when user is logged on" the script runs and s3 is mounted

But when I select the "Run whether user is logged on or not and do a test Run, it is not mounting

How can I mount the S3 on windows machine startup, even when users are not logged on?

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

rclone v1.61.1

  • os/version: Microsoft Windows Server 2019 Datacenter 1809 (64 bit)
  • os/kernel: 10.0.17763.3650 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: cmount

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

AWS S3

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

rclone mount aws:dev-bucket S: --vfs-cache-mode full

The rclone config contents with secrets removed.

I'm using an AWS IAM role instead of Access and Secret Key

>rclone config
Current remotes:

Name                 Type
====                 ====
aws                  s3

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
Paste config here

I suggest you add --log-file c:\rclone.log to your script to see what rclone is doing. Add -vv for debugging too.

hello and welcome to the forum,

please post a screen snippet of the the action tab

Hi

I have manually run the script from the Task Scheduler by selecting the "Run whether user is logged on or not" radio button, I'm unable to see the mount attached

But when I run the same script by selecting "Run only when user is logged on" drive is mounted and works as expected

I have attached the logs for your reference

rclone.log (5.3 KB)

Kindly let me know how can I attach the mount when the instance is started

Thank you

where is rclone.exe located, need to use fullpaths for everything.
c:\path\to\rclone.exe mount aws:dev-bucket S: --vfs-cache-mode full --log-level=DEBUG --log-file=c:\path\to\rclone.log

and for testing, open two command prompts. and run dir s:

  1. command prompt with administrative privileges.
  2. command prompt without administrate privileges.

Hi

rclone.exe is located in " C:\Program Files\rclone "

I have updated the command with full path of rclone and tested, still it is unable to mount when "Run whether user is logged in or not" radio button is checked in Task Scheduler

Also I have opened 2 command prompt and run dir s: , it is returing the same response . It lists the directory and available space details only when I uncheck "Run whether user is logged in or not" radio button is checked in Task Scheduler

To obtain more assistance with this, please see the rclone logs I've attached.

rclone.log (4.4 KB)

Please let me know is there any other option to mount s3 drive on Windows Instance Startup. Once the machine is launched in AWS I need the drive to be mounted

Thank you

the log looks ok.

perhaps try running the mount as system user.

perhaps try mounting to a folder, not a drive letter, which is what i always do.

Is it possible to mount it to a Windows Folders like Documents, Download

If yes please help me with the commands to do so

if you want to mount to the documents folder, then set the mountpoint to that folder.

Thanks the folder mount is working. I'm using this folder mount in AWS Autoscaling, I have configured in Windows Task Scheduler to run a PowerShell script on instance startup for the mount

But when a new instance is launched in Autoscaling, the mount is not attached as expected. The task script is not triggering the script

Would you please guide me through the procedures to mount it automatically without user login?

Thank you

sure,

make sure to use full paths for everything, including the location of rclone, the location of the config file, the location of the debug log

if that does not solve the issue, need to understand, we cannot see into your machine.
no idea about your current setup
so re-answer all the questions in the help and support template.

I have the same issue you are seeing. I believe I was able to make this work as a windows service (Mount command built-in service integration) - still doing my testing, but it looks very promising.

hello and welcome to the forum,

best that you start a new topic, answer all the questions in the help and support template.
posting here that you might have it working, that is just going to confuse the issue.

i am not having an issue, i have no problems running rclone as a service with task scheduler.
and i have posted solutions in many other topics here in the forum.

it is OP that is having the issue and, at this point, we are waiting five days for the OP to respond for a request for basic info.

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