Problem creating new drive remote

What is the problem you are having with rclone?

Upon trying to create a new remote, after trying repeatedly to correct the issue... I am getting the below error.

ERROR : Failed to save config after 10 tries: Failed to create temp file for new config: open /mnt/config/rclone/rclone.conf2784706254: permission denied

This was also, I believe, causing the original remote to fail after a few days... forcing me to recreate the API token

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

rclone v1.58.0

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.4.0-109-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.8
  • 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)

rclone copy -v --bwlimit=15M --config "/mnt/config/rclone/rclone.conf" --filter-from "/mnt/config/rclone/filter-media.txt" -c cloud:/downloads/tv/show" "/mnt/local/downloads/tv/

The rclone config contents with secrets removed.

N/A (blank)

A log from the command with the -vv flag

No log, as I am trying to create a new remote

I have even tried changing ownership of /usr/bin/rclone and /usr/lib/systemd/system/cloud.service from root:root to media:flix, which is the user:group the mount should be mounting as.

[Unit]
Description=rClone Cloud Mount (Google Workspaces)
#AssertPathIsDirectory=/mnt/merge
After=network-online.target

[Service]
Type=simple
#Environment=RCLONE_CONFIG=/mnt/local/config/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount \
  --config /mnt/config/rclone/rclone.conf \
  --rc \
  --rc-addr=192.168.20.10:5572 \
  --log-file=/mnt/logs/rclone/cloud.log \
  --log-level INFO \
  --uid 1002 \
  --gid 1001 \
  --umask 002 \
  --file-perms 0777 \
  --dir-perms 0777 \
  --allow-non-empty \
  --allow-other \
  --fuse-flag sync_read \
  --dir-cache-time=160h \
  --buffer-size=64M \
  --transfers=8 \
  --poll-interval=15m \
  --fast-list \
  --attr-timeout=1s \
  --vfs-read-chunk-size=64M \
  --vfs-read-chunk-size-limit=2G \
  --vfs-cache-max-age=180m \
  --vfs-cache-mode=writes \
  --cache-dir /mnt/cache/rclone \
  --tpslimit=10 \
  --tpslimit-burst=10 \
  --transfers=4 \
  cloud:/ /mnt/cloud

ExecStop=/bin/fusermount -uz /mnt/cloud
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=default.target

That's tell you that you don't have permissions to make a file there. You need to have your rclone.conf somewhere that you can write files as it needs to update the token.

I know that. I don't why, considering this location has correct permissions for reading and writing.
I have since logged out of the user account I was using and logged into media and that has seemed to fix it somewhat... although now rclone is assigning permissions to the conf file as media:media and not media:flix.

I would have thought that the permissions in the service file would launch rclone using those permissions and edit/create all files, including confs under those permissions.

  --uid 1002 \
  --gid 1001 \
  --umask 002 \
  --file-perms 0777 \
  --dir-perms 0777 \

I can't figure out what all those mount permissions have to do with the rclone.conf.

Are you running a rclone mount somewhere?

What is that? A local disk? A rclone mount? Can you write files there as the user you are using?

/mnt/config is where all my configs are stored. /mnt/config/rclone is where rclone.conf and my filter files are stored. It's a local mount.

What user are you running rclone as?
What are the permissions on the directory?
Can you share the output of creating a file in the location above?
Maybe a mkdir as well to validate.

The issue seems to be permissions so we need to dig into that part.

media

755

media@dizzleent:/mnt/config$ ls -la
total 20
drwxr-xr-x  5 root     root     4096 Mar 24 12:28 .
drwxr-xr-x 18 root     root     4096 Aug 23  2021 ..
drwxrwxr-x  6 www-data www-data 4096 Sep  9  2021 nginx
drwxr-xr-x  2 media    flix     4096 Apr 26 09:29 rclone
drwxr-xr-x  3 root     root     4096 Aug 23  2021 services
media@dizzleent:/mnt/config/rclone$ ls -la
total 32
drwxr-xr-x 2 media flix 4096 Apr 26 09:29 .
drwxr-xr-x 5 root  root 4096 Mar 24 12:28 ..
-rwxr-xr-x 1 media flix   70 Aug 30  2021 filter-fanart.txt
-rwxr-xr-x 1 media flix   69 Aug 30  2021 filter-media.txt
-rwxr-xr-x 1 media flix   96 Oct 20  2021 filter-metadata.txt
-rwxr-xr-x 1 media flix  352 Mar 31 17:48 filter-movies_move.txt
-rwxr-xr-x 1 media flix  726 Apr  6 23:09 filter-tv_move.txt
-rwxrwxr-x 1 root flix  608 Apr 26 09:29 rclone.conf
drwxr-xr-x 2 media flix  4096 Apr 26 10:25 .
drwxr-xr-x 5 root  root  4096 Mar 24 12:28 ..
-rwxr-xr-x 1 media flix    70 Aug 30  2021 filter-fanart.txt
-rwxr-xr-x 1 media flix    69 Aug 30  2021 filter-media.txt
-rwxr-xr-x 1 media flix    96 Oct 20  2021 filter-metadata.txt
-rwxr-xr-x 1 media flix   352 Mar 31 17:48 filter-movies_move.txt
-rwxr-xr-x 1 media flix   726 Apr  6 23:09 filter-tv_move.txt
-rwxrwxr-x 1 media flix   608 Apr 26 09:29 rclone.conf
-rw-rw-r-- 1 media media    5 Apr 26 10:25 test.txt
media@dizzleent:/mnt/config/rclone$ ls -la
total 40
drwxr-xr-x 3 media flix  4096 Apr 26 10:27 .
drwxr-xr-x 5 root  root  4096 Mar 24 12:28 ..
-rwxr-xr-x 1 media flix    70 Aug 30  2021 filter-fanart.txt
-rwxr-xr-x 1 media flix    69 Aug 30  2021 filter-media.txt
-rwxr-xr-x 1 media flix    96 Oct 20  2021 filter-metadata.txt
-rwxr-xr-x 1 media flix   352 Mar 31 17:48 filter-movies_move.txt
-rwxr-xr-x 1 media flix   726 Apr  6 23:09 filter-tv_move.txt
-rwxrwxr-x 1 media flix   608 Apr 26 09:29 rclone.conf
drwxrwxr-x 2 media media 4096 Apr 26 10:27 test
-rw-rw-r-- 1 media media    5 Apr 26 10:25 test.txt

I'm trying to re-read this.

What command you running now that has the problem? Can you share that with -vv output and post the full log?

Sorry for the late reply. I have resolved this.

I ended up adding all of the flix-based users (emby, sonarr, radarr, nzbget, media) to the flix group by using
usermod -g group user - this adds a user to a primary group.

For assigning users to additional groups, you can use.
usermod -a -G group user

I am pretty certain that this will help a lot of people experiencing problems with permissions.

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