Encrypted gdrive remote not showing up

What is the problem you are having with rclone?

Trying to setup an encrypted gdrive remote, service appears to be running but nothing shows up in the local directory that I am using as the mount point.

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

rclone v1.64.0

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.15.0-1040-oracle (aarch64)
  • os/type: linux
  • os/arch: arm64 (ARMv8 compatible)
  • go/version: go1.21.1
  • go/linking: static
  • go/tags: none

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

Google Drive

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

[Unit]
Description=Encrypted Google Drive
AssertPathIsDirectory=/home/ubuntu/media
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
Environment=RCLONE_CONFIG=/home/ubuntu/.config/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount gcrypt: /home/ubuntu/media \
--allow-other \
--rc-no-auth
ExecStop=/bin/fusermount -u /home/ubuntu/media

Restart=always
RestartSec=10
[Install]

WantedBy=default.target

(i know my service file is garbage, but it should be functional. I'l make another post after I get this working for people to help me add correct/useful flags etc)

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

[gcrypt]
type = crypt
remote = gdrive:/mediacrypt
password = XXX

[gdrive]
type = drive
scope = drive
token = XXX
team_drive =

A log from the command that you were trying to run with the -vv flag

Apologies but I am not sure how to set up logging in the service file.

Paste  log here

First try to make it work from cmd:

rclone mount gcrypt: /home/ubuntu/media --allow-other -vv

does it work? if not please post its output.

1 Like

deleting my previous reply as I figure out one piece and now have another. I removed my service file as it was creating problems with a manual attempt to mount. Now I'm getting a fuser error:


ubuntu@jellyfin-gdrive-optimized:~$ rclone mount gcrypt: /home/ubuntu/media --al                                   low-other -vv
2023/09/12 13:30:53 DEBUG : rclone: Version "v1.64.0" starting with parameters [                                   "rclone" "mount" "gcrypt:" "/home/ubuntu/media" "--allow-other" "-vv"]
2023/09/12 13:30:53 DEBUG : Creating backend with remote "gcrypt:"
2023/09/12 13:30:53 DEBUG : Using config file from "/home/ubuntu/.config/rclone/                                   rclone.conf"
2023/09/12 13:30:54 DEBUG : Creating backend with remote "gdrive:/mediacrypt"
2023/09/12 13:30:54 DEBUG : Google drive root 'mediacrypt': 'root_folder_id = 0A                                   PxVJMubsWSDUk9PVA' - save this in the config to speed up startup
2023/09/12 13:30:54 DEBUG : fs cache: renaming cache item "gdrive:/mediacrypt" t                                   o be canonical "gdrive:mediacrypt"
2023/09/12 13:30:54 DEBUG : Encrypted drive 'gcrypt:': Mounting on "/home/ubuntu                                   /media"
2023/09/12 13:30:54 mount helper error: fusermount3: option allow_other only all                                   owed if 'user_allow_other' is set in /etc/fuse.conf
2023/09/12 13:30:54 Fatal error: failed to mount FUSE fs: fusermount: exit statu                                   s 1

OK. I went at uncommented user_allow_other in fuse.conf and that seems to have made SOME progress. Now when I run the command, it seems to mount but it hangs here and just sits:

ubuntu@jellyfin-gdrive-optimized:~$ rclone mount gcrypt: /home/ubuntu/media --allow-other -vv                                                             2023/09/12 13:40:52 DEBUG : rclone: Version "v1.64.0" starting with parameters ["rclone" "mount" "gcrypt:" "/home/u                                       buntu/media" "--allow-other" "-vv"]
2023/09/12 13:40:52 DEBUG : Creating backend with remote "gcrypt:"
2023/09/12 13:40:52 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2023/09/12 13:40:52 DEBUG : Creating backend with remote "gdrive:/mediacrypt"
2023/09/12 13:40:52 DEBUG : gdrive: Loaded invalid token from config file - ignoring
2023/09/12 13:40:52 DEBUG : Saving config "token" in section "gdrive" of the config file
2023/09/12 13:40:52 DEBUG : gdrive: Saved new token in config file
2023/09/12 13:40:52 DEBUG : Google drive root 'mediacrypt': 'root_folder_id = 0APxVJMubsWSDUk9PVA' - save this in the config to speed up startup                                   
2023/09/12 13:40:52 DEBUG : fs cache: renaming cache item "gdrive:/mediacrypt" to be canonical "gdrive:mediacrypt"
2023/09/12 13:40:52 DEBUG : Encrypted drive 'gcrypt:': Mounting on "/home/ubuntu/media"
2023/09/12 13:40:52 DEBUG : : Root:
2023/09/12 13:40:52 DEBUG : : >Root: node=/, err=<nil>
2023/09/12 13:41:52 DEBUG : Google drive root 'mediacrypt': Checking for changes on remote

It looks like it works now.

When I run it with --daemon so I can actually poke around the headless server, it won't let me enter the directory.

cd /home/ubuntu/media

freezes and hangs. Can't even ctrl-x or ctrl-c out of it, have to close the SHH program entirely.

I stopped the service, now that directory is 100% unresponsive. Can't even delete it as I get the 'device busy or in use" error.

It means you have some old mount active:

pkill rclone

then check if no more rclone running:

ps -ef | grep rclone

Doesn't seem to be killing the process.

sudo kill -9 1425

or

sudo pkill rclone

And do not use --daemon until things are working.

Open another SSH session or use tmux or screen.

Hi again, I feel like I'm getting there thanks to your help. I am mounting the encrypted mount without errors but when i open a new SSH window and check the directory, nothing is there.

ubuntu@jellyfin-gdrive-optimized:~/media$ rclone mount gcrypt: /home/ubuntu/medi                                          a --allow-other -vv
2023/09/12 16:34:48 DEBUG : rclone: Version "v1.64.0" starting with parameters [                                          "rclone" "mount" "gcrypt:" "/home/ubuntu/media" "--allow-other" "-vv"]
2023/09/12 16:34:48 DEBUG : Creating backend with remote "gcrypt:"
2023/09/12 16:34:48 DEBUG : Using config file from "/home/ubuntu/.config/rclone/                                          rclone.conf"
2023/09/12 16:34:48 DEBUG : Creating backend with remote "gdrive:/home/ubuntu/me                                          dia"
2023/09/12 16:34:48 DEBUG : Google drive root 'home/ubuntu/media': 'root_folder_                                          id = 0APxVJMubsWSDUk9PVA' - save this in the config to speed up startup
2023/09/12 16:34:49 DEBUG : fs cache: renaming cache item "gdrive:/home/ubuntu/m                                          edia" to be canonical "gdrive:home/ubuntu/media"
2023/09/12 16:34:49 DEBUG : Encrypted drive 'gcrypt:': Mounting on "/home/ubuntu                                          /media"
2023/09/12 16:34:49 DEBUG : : Root:
2023/09/12 16:34:49 DEBUG : : >Root: node=/, err=<nil>

If I mount the NON-encrypted version of this mount 'gdrive' it works just fine.

what is your crypt mount command?

rclone mount gdrive: /home/ubuntu/media --allow-other -vv

the mount works, when i go into the /home/ubuntu/media directory I see the contents of my google drive

rclone mount gcrypt: /home/ubuntu/media --allow-other -vv

the mount APPEARS to work, I get all this:



ubuntu@jellyfin-gdrive-optimized:~$ rclone mount gcrypt: /home/ubuntu/media --allow-other -vv
2023/09/12 21:22:36 DEBUG : rclone: Version "v1.64.0" starting with parameters ["rclone" "mount" "gcrypt:" "/home/ubuntu/media" "--allow-other" "-vv"]
2023/09/12 21:22:36 DEBUG : Creating backend with remote "gcrypt:"
2023/09/12 21:22:36 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2023/09/12 21:22:36 DEBUG : Creating backend with remote "gdrive:/home/ubuntu/media"
2023/09/12 21:22:36 DEBUG : Google drive root 'home/ubuntu/media': 'root_folder_id = 0APxVJMubsDFEUk9PVA' - save this in the config to speed up startup
2023/09/12 21:22:36 DEBUG : fs cache: renaming cache item "gdrive:/home/ubuntu/media" to be canonical "gdrive:home/ubuntu/media"
2023/09/12 21:22:36 DEBUG : Encrypted drive 'gcrypt:': Mounting on "/home/ubuntu/media"
2023/09/12 21:22:36 DEBUG : : Root:
2023/09/12 21:22:36 DEBUG : : >Root: node=/, err=<nil>

But when I go into the /home/ubuntu/media directory nothing is there.

and what you see when you run:

rclone ls gcrypt:

Failed to ls: directory not found

mediacrypt folder exists?

based on the remote config, i find that path strange?
as if rclone is combining gdrive: from the remote and /home/ubuntu/media from local.

I don't think so, what would create that directory?

do I need to manually create a directory for the encrypted mount? I created the gdrive remote. I created the gcrypt to place the gdrive remote at /home/ubuntu/media.

If I just mount gdrive it works great. But if I unmount and kill that process and try again with gcrypt, I get nothing

maybe, not 100% sure about gdrive. maybe gdrive will create it on the fly.
fwiw, i always pre-create

well, have you copied any files into the gcrypt: or is it supported to be empty at this point?

please, let's forget about mount, need to get simple commands working.
can you post output of these commands, redact as needed.

rclone ls gdrive:mediacrypt -vv
rclone ls gcrypt: -vv

and based on that might need to copy a file into the crypt

rclone mkdir gdrive:mediacrypt -v
rclone touch gcrypt:file.ext -v
rclone ls gcrypt: -vv
1 Like