Permission issues with Mergerfs and Sonarr

What is the problem you are having with rclone?

Not the right permission after moving folders/files, Radarr/Sonarr doesn't recognize anything since the owner has passed from 911 to root

What is your rclone version (output from rclone version)

rclone v1.52.3

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

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

Debian 10

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'm using these script :

The rclone config contents with secrets removed.

type = drive
client_id = XX
client_secret = XX
scope = drive
token = {"access_token":"XX","token_type":"Bearer","refresh_token":"XX"}
Edit remote
** See help for drive backend at: **

Value "client_id" = "XX"

I have some permission issues with my Sonarr/Radarr on my VPS server running Debian 10: when a movie/tvshow is moved by Radarr/Sonarr, no issues so far: owner of the file is 911, but yesterday I moved my folder to have a better organisation and now all of my files are owned by root, so Radarr/Sonarr can't access it.

I'm using these script to mount/unmount/upload :

Here's what it looks like inside the mergerfs mount:

├── local
├── mount_mergerfs
│   ├── torrents
│   ├── downloads
│   ├── media
│   └── media
│        ├── movies
│        ├── movies4k
│        ├── tv
│        └── tv4k 
└── mount_rclone

Is there any way to have all of my files to get back the 911 owner?
Thanks for any support!

You'd make that in your mount command by adding in the user and group flags:

If you used the template for Help and Support rather than deleting it, I'd give you the exact command because we'd have all the right information to answer it on the first shot.

Sorry I was using the template but found that a lot of question was not so relevant to my problem, and I forgot to mention that I use these script to mount/unmount and upload files :

I'll edit my post with the template completed!

If you are referring to


It's already in the mount script :

# create rclone mount
   rclone mount \
   --allow-other \
   --buffer-size 256M \
   --dir-cache-time 720h \
   --drive-chunk-size 512M \
   --log-level INFO \
   --vfs-read-chunk-size 128M \
   --vfs-read-chunk-size-limit off \
   --vfs-cache-mode writes \
   --bind=$RCloneMountIP \
   $RcloneRemoteName: $RcloneMountLocation &

Are you running rclone as the root users?

Not sure about this, I'm running the mount script as a cronjob.

The crontab would associated with a user.

What user's crontab did you put it in?

You can run:

ps -ef | grep rclone

and share the output.

Here you go:

root       821   809  0 15:24 ?        00:00:00 /bin/sh -c ({ /usr/local/bin/; } | tee /tmp/EPxp4nZbuKUqr7Lk.stdout) 3>&1 1>&2 2>&3 | tee /tmp/EPxp4nZbuKUqr7Lk.stderr
root       824   821  0 15:24 ?        00:00:00 /bin/sh -c ({ /usr/local/bin/; } | tee /tmp/EPxp4nZbuKUqr7Lk.stdout) 3>&1 1>&2 2>&3 | tee /tmp/EPxp4nZbuKUqr7Lk.stderr
root      3464     1  0 15:24 ?        00:00:06 rclone mount --allow-other --buffer-size 256M --dir-cache-time 720h --drive-chunk-size 512M --log-level INFO --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit off --vfs-cache-mode writes --bind= gdrive: /data/mount_rclone/gdrive
root      4132     1  0 15:24 ?        00:00:01 mergerfs /data/local/gdrive:/data/mount_rclone/gdrive /data/mount_mergerfs/gdrive -o rw,async_read=false,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true
root      6074  4620  0 16:46 pts/1    00:00:00 grep rclone

So if you want to change the owner and group as it's running as root, you need to add in:

    --uid uint32                             Override the uid field set by the filesystem. (default 1000)
      --gid uint32                             Override the gid field set by the filesystem. (default 1000)

You'd make those numbers the uid and gid of the user you want. In this example, I could use 1000/1000.

felix@gemini:~$ id felix
uid=1000(felix) gid=1000(felix) groups=1000(felix),4(adm),24(cdrom),27(sudo),30(dip),44(video),46(plugdev),109(render),116(lxd)

The next bit is your umask:

      --umask int                              Override the permission bits set by the filesystem.

You can set if a few ways and 000 lets everyone see everything as it looks like you are own your own server as you are running things as root, that should be ok.

Thanks for this! But how do I choose the user? The only user on my server is root, and I don't know what Radarr/Sonarr use as docker container? Before my mess, ls -al showed owner as 911

Use 911 then? I am not sure as I don't use dockers as I find they over complicate things.

Hey, just for updating the topic, this is what I added to the script :

--uid 911 \
--gid 911 \
--umask 000 \

And now it's working fine!

1 Like

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