Mount command issue with AWS S3

What is the problem you are having with rclone?

I am trying to use rclone mount feature to mount an AWS S3 bucket on a local mount point using below command, it never returns and nothing happens (does not gives back control to console).

sudo rclone mount aws-s3:com-genexus-backup-and-recovery /mnt/shishir

Then I executed the command using --daemon flag like below,

sudo rclone mount aws-s3:com-genexus-backup-and-recovery /mnt/shishir --daemon

This time command returned control back to console but the s3 bucket was not mounted instead it changed the owner and read write permission of mount point
from
drwxrwxr-x 2 iruser irgrp 4096 Oct 6 04:29 shishir/

to
d????????? ? ? ? ? ? shishir/

Reading the blogs rclone mount looks straight forward but I am not sure what I am doing wrong here, I have explored and used other commands like copy, sync, config and ls without any issues but there is no luck with mount.

What is your rclone version (output from rclone version)

rclone v1.53.0

  • os/arch: linux/amd64
  • go version: go1.15

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

Ubuntu 18.04.1 LTS
x86_64

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

AWS S3

The rclone config contents with secrets removed.

[aws-s3]
type = s3
provider = AWS
env_auth = false
access_key_id = ***
secret_access_key = ***
region = us-east-1
acl = private

[aws-s3-crypt]
type = crypt
remote = aws-s3:com-genexus-backup-and-recovery
filename_encryption = standard
directory_name_encryption = false
password = ***
password2 = ***

A log from the command with the -vv flag

2020/10/06 04:52:47 DEBUG : rclone: Version "v1.53.0" starting with parameters ["rclone" "mount" "aws-s3:com-genexus-backup-and-recovery" "/mnt/test5" "-vv" "--daemon"]
2020/10/06 04:52:47 DEBUG : Creating backend with remote "aws-s3:com-genexus-backup-and-recovery"
2020/10/06 04:52:47 DEBUG : Using config file from "/home/iruser/.config/rclone/rclone.conf"
2020/10/06 04:52:47 DEBUG : rclone: Version "v1.53.0" finishing with parameters ["rclone" "mount" "aws-s3:com-genexus-backup-and-recovery" "/mnt/test5" "-vv" "--daemon"]

hello and welcome to the forum,

if you are trying to mount the crypted remote aws-s3-crypt,
then rclone mount aws-s3-crypt:

Hi, thank you.

I tried below command, and it got stuck as explained in original description

sudo rclone mount aws-s3-crypt: /mnt/test7 -vv

and gives me below output

2020/10/06 07:14:52 DEBUG : rclone: Version "v1.53.0" starting with parameters ["rclone" "mount" "aws-s3-crypt:" "/mnt/test7" "-vv"]
2020/10/06 07:14:52 DEBUG : Creating backend with remote "aws-s3-crypt:"
2020/10/06 07:14:52 DEBUG : Using config file from "/home/iruser/.config/rclone/rclone.conf"
2020/10/06 07:14:52 DEBUG : Creating backend with remote "aws-s3:com-genexus-backup-and-recovery"
2020/10/06 07:14:52 INFO  : Encrypted drive 'aws-s3-crypt:': poll-interval is not supported by this remote
2020/10/06 07:14:52 DEBUG : Encrypted drive 'aws-s3-crypt:': Mounting on "/mnt/test7"
2020/10/06 07:14:52 DEBUG : : Root: 
2020/10/06 07:14:52 DEBUG : : >Root: node=/, err=<nil>

not seeing anything wrong with that debug log, looks good to me.

I see below two more lines added in debug log but its not done yet, its been more than half an hour now.
How long does it take generally?

2020/10/06 07:22:27 DEBUG : : Statfs: 
2020/10/06 07:22:27 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=<nil>

not sure what you mean,

the command will continue to run until you kill it.

what is the output of ls /mnt/test7

Hi, Sorry I did not knew command continues to run until killed. by the way for the time commands run the mounted directory becomes unaccessible, ls -al command in /mnt directory gives below result

drwxr-x---   2 root   root   4096 Aug 15 03:11 abcd
d?????????   ? ?      ?         ?            ? test7

Output of ls /mnt/test7 is below
ls: cannot access 'test7': Permission denied

You need to run rclone mount while accessing the mount.

You can use the --daemon flag to get it to run in the background.

Don't run rclone mount with sudo - run it as a normal user (yourself) and you should find the permissions problems are gone.

Or if you must run it as root then add --allow-other and --allow-root flags.

1 Like

Thanks a lot Nick,

Executing the command while accessing the mount did the trick, I was stuck on this from many days :slight_smile:
Just on more query, when we run mount in daemon mode, is it possible that the drive gets unmounted automatically due to some reason or its full proof?

Thanks again for you help.

It shouldn't get unmounted by itself. However crashes can cause the mount to disappear and the OS can kill the mount.

Most people use systemd to start rclone mount in the background which can restart it if it goes wrong.

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