I’m migrating my Sonarr install from my desktop to my Truenas Scale (latest Dragonfish stable build) and I’ve run into an issue whereby Sonarr doesn’t see the folder where my TV Shows are located. The “Media2” directory just shows as blank. I did the exact same install earlier with SABnzbd and it saw the directory without any issues.
Here’s the screenshot of what I’m seeing in Sonarr:
I am seeing the same thing. Both Sonarr and Plex are seeing everything in /mnt/tank/media
but Sonarr only sees the top level folders and none of the existing TV show file folders.
I checked permissions (using the same user and group as SABNZBD) and I checked my volume variables and they look correct:
I have rechecked my configs a bunch of times, and the mappings are correct.
When I check inside the NZBGET webpage and set my root folders, it seems to be showing the Apps container (wich is a 200G dataset) and not my Media dataset (101TB)
You may have permission issues, it depends. Users and Groups inside a container are not the same as outside or between containers, additionally, application can runas (not root). You can see this if you do stuff like “cat /etc/passwd” or “cat /etc/groups” and compare them between enviroments.
Also if you exec into a container (“docker exec -it containerName /bin/bash”), the user is more than likely root so you will see what the application doesn’t if its running as a different user/group. Therefore, it depends how the image was created.
As you have seen, Linuxserver has env’s for UID and GID that can be defined, which is extremely useful and some images don’t do this. This fundamentally runs the application as those users and groups, not the container, but the application in the container. So images have this hard coded and you cannot change the IDs of what the application runs as.
I hope this clarifies how this peace works.
Now, for the permissions of folders, I’d recommend:
consentrating on the groups so you can have different UIDs per application (if you want that).
change the permissions so users and groups can rw at a minimum (chmod -R 660 /path/of/data/for/the/application/).
changing the group to your shared group to access data (chgrp -R “the defined GID” /path/of/data/for/the/application/)
So, when I spun up the application it created the user sonarr with a user and group id of 4000.
I added the UID and GID to the media dataset permissions with r/w/e access via the acl on that dataset. It did not change anything. I did this via the GUI because I am not great in the CLI.
Do I really need to do this via the comand line? Why? Isn’t that what the ACL is for?
Inside of the sonarr application, when I map a drive, they all map back to /mnt/apps (I know this because the size of the drive matches the apps dataset). It should be mounting the /mnt/tank/media dataset which is far larger and actually has the media.
I decided to start over with my datasets and applications after reading this setup guide:
I liked the idea of hardlinks and atomic moves, and it looks like it will be easier to manage permissions, but I have a couple of questions about his permissions setup because I really think I haven’t wrapped my head around this:
In his example all of the applications are created using the same PUID and PGID (1000). He then says to “Recursively chown user and group and Recursively chmod to 775/664”
Just FYI, there are differences with the ACL types and you need to use different commands to visualise them. However, from the GUI when you changed the permissions did you turn on “Apply permissions recursively”?
There is always more than one way, its just how I handle it. I’m just trying to help because you are doing something that is “manual” as your in the beta. I beleive Truenas as part of there apps are doing an automation for the ACL permissions.
So your not seeing all the volumes you have mounted within Sonarr? Only /config?
Did you response your issue? Can you check the permission on your Windows directory? I don’t use the apps, but it could be a bug. I sore some reports relating to permissions on the apps deployments.
I saw all the volumes mounted, but inside the application, the mounted drive only appeared to be the size of the “apps” dataset. I burned down all my applications and started over. The post just above yours shows what I am trying to do now.
I still have questions about those permissions in the guide I linked.
I went down the path of ensuring that by Sonarr, and Plex datasets in my App pool all have Owner and Group set to “apps”, then I did the same thing for my “Windows” dataset in my “Media2” pool. I also confirmed that the permissions to both are set to full control but this didn’t make any difference.
The one difference that I noticed that that the permissions at the pool level are set to Owner: apps and Group: apps for the Apps pool but they are set to root for both Owner and Group for the Media2 pool. See the below images:
Could this be the issue? I don’t see any way of changing them so that they are the same, either root or apps.
My next step is to play around with installing Sonarr on the Media3 pool 4TB (just a single drive) to see if I can get it to work or maybe but a small sample of TV shows in that pool to see if the SOnaar install on the Apps pool will see it.
So I created that new temp pool called Media3 which automatically had the permission for Owner and Group set to root. I then created a new generic dataset under it called Sonarr2 which also automatically had the Owner and Group set to root as expected. I then installed another instance of Sonarr in the Sonarr2 dataset on the Media 3 pool. I followed the same install procedure as I outlined in the initial post of this thread.
I then launched the Sonarr web portal and tried to add the TV shows that are stored in the Media2 pool in the Windows dataset (which I mapped to during the install) which currently has Owner and Group set to apps (so this does NOT match the Owner and Group for the Sonarr2 dataset in the Media3 pool). As expected when clicking the Media2 directory it was empty.
I then stopped the 2nd instance of Sonarr and changed the Owner and Group of the Sonarr2 dataset from root and root to apps and apps respectively and then restarted that 2nd instance of Sonarr. I really thinking that this was going to do the trick but alas same old story. I really am at a loss now.
I guess the next thing I’ll try is to create a new dataset under Media3 and throw a single TV show in there to see if either of the Sonarr instances will see it.
So I created a new generic dataset under the Media3 pool called TV_Shows and copied a single TV show in there. I then mapped that TV_Shows dataset to the first instance of Sonarr and lo and behold it SHOWED UP when browsing to Import and existing show via the Sonarr GUI!!
Progress right? Well the difference between this TV_Shows dataset and the Windows dataset under the Media2 pool is that the Windows dataset is an SMB dataset while the TV_Shows one is just a generic one. So I thought maybe there’s some sort of bug with Sonarr not liking SMB datasets.
Next I created another dataset under the Media3 pool, called it TV, and made this one an SMB dataset. Copied a single show in there, mapped this TV dataset to the first instance of Sonarr as well and lo and behold it SHOWED UP too!!!
So now I’m really confused and dunno WTF is going on. Tomorrow I’m going to go though a do a detailed comparison of the permissions of the Windows SMB dataset and the TV SMB dataset to see if there’s any difference. Failing that I think I might have to re-create the Media2 pool, the Windows SMB dataset and recopy all the data in there. Not looking forward to copying 60+TB of data again. But good thing I still have it in the original Media dataset. I was “this” close to turfing that a couple of days ago. lol
Oh, one last thing, mapping the original Windows SMB dataset in the Media pool to the 1st Sonarr instance also yielded an empty Media directory when trying to import exsting TV shows.
I’ve just taken a deeper look at the UI, because I’m more CLI than anything and my system and config goes back years of me not modifying (pre advances including Dragonfish). Although I’ve needed to do a bit more with EE, so your making me focus on it and possible fix a couple of issues. Therefore don’t quote me!
The owner@, group@, everyone@ represent the file system, other groups for the ACL of type “SMB/NFSv4” does not set other POSIX file system permissions:
Result
I’m not suggesting you to change to POSIX! This shows that the permissions for your configuration isn’t applied to the file system and therefore getting to the contrainers.
I would therefore suggest, setting owner@ to your UID (I think thats apps for your configuration) and group@ to your GID. This will set your file system permissions and allow applications in the containers access. Any additional groups added will be applied to the shares such as SMB, but will not work on the file system.
When I spin up Sonarr and specify the PUID and PGID, the application does not seem to care. The new application came up with a new user “sonarr” with a PUID and PGID of 3000.
My Tank dataset is owned by Root right now, and I was going to change that over to the PUID/PGID of the application, but I am trying to figure out how I do that if I am running multiple applications with multiple users.
If I changed it to “apps” for instance, that user does not seem to be controlling the applications at all, so how would that change the way that mounted volumes are interacted with?
the permissions that are set on the media share:
root@truenas[/mnt/tank]# ls -l
total 258
drwxrwxrwx 22 apps apps 34 Sep 12 15:05 media
drwx------ 2 sonarr sonarr 5 Sep 3 14:13 smbuser
drwxrwxrwx 5 apps apps 5 Sep 12 15:08 usenet
I am still not seeing any files in Sonarr, and can’t import any of my series.
What do you mean by “the new application came up with a new user “sonarr” with a PUID and PGID of 3000”. Where did you see this?
You also have everyone as rwx, so it does not matter about the owner or group. So are all the files and folders (including sub folders and files) under that path the same?
I’ve given up on trying to figure out docker setups.Every time I solve one problem, another crops up. You guys are extremely helpful, and I appreciate it. I guess I am just too much of a noob to understand all the ins and outs of the docker configs, the permissions editing etc.
I got the SONARR, and RADARR applications mostly working the way I want using the apps functionality on eel.
Sabnzbd still has to be run on my older drone box and connected via NFS share to the server. Again this is about 80% of the way to where I want it, and at least my downloads are working now.
I’m still having issues with sorting things into the right folders right now. I think this has something to do with the mappings I have to use on Sabnzbd and how it interacts with apps on the server. eventually Sabnzbd will get an app created and I can move everything over.
Currently, the Apps pool is set to Owner: apps and Group: apps and the Sonarr dataset containing the first instance of Sonarr that I installed is set to Owner: apps and Group: apps. The Media2 pool is set to Owner: root and Group: root and the Windows SMB dataset on that pool is set to Owner: apps and Group: apps. Using this Sonarr I get an empty Media2 directory when trying to add existing shows. So are you saying that this is because of the mis-match of Owner and Group (apps vs. root) at the pool level between these two pool (Apps and Media2)? If so then how do I change it on the Media2 pool?
And even then, I’m not sure that’s the issues because when created a new test pool called Media3, which is set to Owner: root and Group: root. I then created a new SMB dataset called TV and it is also set to Owner: root and Group: root. Using the Sonarr gui for the Sonar installed in the Apps pool (which is set to Owner: apps and Group: apps) under the Sonarr dataset (which is also set to Owner: apps and Group: apps) I am able to view the contents of the Media2 directory when trying to add existing shows.
Here are the screenshots that will hopefully help make sense of what I’ve written:
Apps Pool and Sonarr Dataset
Just FYI, I concentrate on the group, (and have any owner) so if I create a file, its owned by me but I have a common group so other apps and users can access them at the file system level. This is the same in reverse where an app user owns a file with a common group, so other users can access them.
So, yes change the owner@ and/or group@ on your media dataset (does not need to be the predecessor, unless you traversing) so your application can access that data.
Also I suspect why Media3 is working is because of everyone@/other has read permissions. I cannot see what you have for Media2.
The owner and group of the Media2 dataset is already set to apps and apps and that still gave me an empty directory in Sonarr. You can see that in the 4th in my previous post.
I just tried setting the permissions of the Windows dataset on the Media2 pool to mirror exactly that of the TV dataset on the Media3 pool (which I have confirmed works) and even that didn’t work.