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)
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.
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.
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@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 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.