Rclone gdrive not mounting: permissions or fuse issue?

I am mounting rclone using a systemd service:

the rclone.service file:

[Unit]
Description=RClone Service
RequiresMountsFor=/home/username

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount crypt: /mnt/gdrive
–config=/home/abe/.rclone.conf
–allow-non-empty
–allow-other
–buffer-size 256M
–dir-cache-time 72h
–drive-chunk-size 32M
–log-level INFO
–log-file /home/abe/logs/rclone.log
–vfs-read-chunk-size 128M
–vfs-read-chunk-size-limit off

ExecStop=/bin/fusermount -uz /mnt/gdrive
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

The error I get in the logfile:

2018/12/21 20:23:27 Fatal error: failed to mount FUSE fs: fusermount: exit status 1
2018/12/21 20:23:28 mount helper error: fusermount: option allow_other only allowed if ‘user_allow_other’ is set in /etc/fuse.conf

the fuse.conf file in question which I changed to: The permissions on this fuse.conf file are root:root (rw, r, r)

/etc/fuse.conf - Configuration file for Filesystem in Userspace (FUSE)

Set the maximum number of FUSE mounts allowed to non-root users.

The default is 1000.

#mount_max = 1000

Allow non-root users to specify the allow_other or allow_root mount options.

user_allow_other

The location I am trying to mount to /mnt/gdrive has ownership root:root, which I can’t seem to chown

I have searched the internet for any similar mount errors and I’ve come up with nothing. Please help! What am I doing wrong?

For more information, this was working previously, but I restarted my pc and installed a new hdd(which might be the cause of these problems).

Did you save the fuse.conf file? That error means the last line for the user_allow_other isn’t in the fuse.conf.


felix@gemini:~$ cat /etc/fuse.conf
# /etc/fuse.conf - Configuration file for Filesystem in Userspace (FUSE)

# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#mount_max = 1000

# Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other

After I edited it, I did save it.

cat /etc/fuse.conf
# /etc/fuse.conf - Configuration file for Filesystem in Userspace (FUSE)

# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#mount_max = 1000

# Allow non-root users to specify the allow_other or allow_root mount options.
user_allow_other

I also ran

sudo systemctl daemon-reload
sudo systemctl restart rclone.service

When I try to rclone ls crypt:, I get the same error in my log file. Is there anything else I need to do to have the changes take effect?

No, it’s instant. Can you try to run it from the command line rather than systsemd and see what happens?

The command just seems to be sort of hung there for the last 5 min and still is… Here’s what I ran:

rclone mount crypt: /mnt/gdrive --config=/home/abe/.rclone.conf --allow-non-empty --allow-other --buffer-size 256M --dir-cache-time 72h --drive-chunk-size 32M --log-level INFO --log-file /home/abe/logs/rclone.log --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off

If you run it from the command prompt, it won’t ever return. You have to fusermount to stop it, but that means it is working.

checking the log file shows a different error this time:

2018/12/23 20:26:46 INFO : Google drive root ‘teamDrive’: Failed to get StartPageToken: Get https://www.googleapis.com/drive/v3/changes/st$
Response: {
“error”: “unauthorized_client”,
“error_description”: “Unauthorized”

Possibly relevant: Have a teamdrive. I tried to figure out how to link it to the google console to monitor api hits yesterday. I entered client id and client secret to the gdrive remote, didn’t touch the crypt remote. The api didn’t seem to work (I couldn’t figure out what to do exactly).

However, yesterday, the rclone mount was still working properly after the clientid/client secret edit. So far, I have restarted it today.

Looks like your key is bad and you’d need to reset it up.

https://rclone.org/drive/#team-drives

Alright, Ill resetup everything.

Just a few questions to make sure I get it right this time:

  1. Ill go to Google Console. Create OAuth client ID for application type: Other.

  2. Name it whatever: rclone. Get client ID and client secret.

  3. Create Google Drive remote. Enter client ID and client secret.

  4. Scope full drive access.

  5. Get code in web browser, copy paste back into rclone interactive prompt.

  6. Configure as team drive.

  7. Setup a crypt remote

  8. Wrap crypt remote around gdrive.

  9. Keep passwd1 and salt passwd2 same as last time to make sure the encrypted files I already have on there can be decrypted.

  10. Mount with systemd service to run on startup.

Am I getting this right? What do I need to in the google console after generating id/secret?

I create a project in Google Console. And then what? How do I get the OAuth credentials to work? Do I need to generate an API key after this? I can’t figure out where to enter it.

I am following this guide and it just leaves it there: https://bytesized-hosting.com/pages/plexdrive

If you have a better guide, please let me know, I barely know what I’m doing.

And once again thank you so so much for your help. Words can’t express how grateful I am for you taking the time to help me troubleshoot.

Looks right to me.

Here is how to create your API key.

https://rclone.org/drive/#making-your-own-client-id