iocage sonarr

blubyu

Cadet
Joined
Feb 19, 2016
Messages
8
So I have installed sonarr using the new GUI in the 11.2 nightlies. Everything gets installed fine and seems to be running fine. I mounted my media dataset to the jail. Sonarr can see it and browse it just fine. When I go to add existing series, sonarr tells me that I don't have permission to write to the directory. This makes sense because sonarr is running as user 'sonarr' and the dataset is owned by another user. In the old warden jail system I followed these instructions to change the user that sonarr starts/runs as:

Code:
pw useradd -n USER -u UID -d /nonexistent -s /usr/sbin/nologin

service PLUGIN onestop
chown -R USER:GROUP /var/db/PLUGIN
sysrc 'PLUGIN_user=USER'
service PLUGIN start


The first, second, fourth and fifth command work fine. The third command doesn't because that directory doesn't exisit.

After I run the above commands I can no longer start sonarr. If I switch the user back to 'sonarr' then it starts just fine...but I don't have permission to write to the directory.

Anybody have any words of wisdom :)
 
Last edited:

blubyu

Cadet
Joined
Feb 19, 2016
Messages
8
ok, I figured it out :)

Replace this step:
Code:
chown -R USER:GROUP /var/db/PLUGIN

With this step:
Code:
chown -R USER:GROUP /usr/local/sonarr


This is just for sonarr...it might be different for another plugin.

After I ran all the commands I restarted sonarr and it started fine. I then had read/access to the dataset and was able to add all of my existing shows.
 

Daniyal

Dabbler
Joined
Mar 4, 2019
Messages
18
Thanks for this, having a similar issue when trying to add shows to Sonarr wasn't sure how or what permissions to change.. will give this a shot.
 

Daniyal

Dabbler
Joined
Mar 4, 2019
Messages
18
Keeps telling me the user/group does not exist.. did you create a new user and group in the Sonarr shell or did you link it with the user/group defined under FreeNAS?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Keeps telling me the user/group does not exist.. did you create a new user and group in the Sonarr shell or did you link it with the user/group defined under FreeNAS?
You can't link users and groups in a jail to them in freenas. You have to create them in the jail.

I would also suggest not following these instructions. They are not very simple or good. Best way is to just add the sonarr user in the jail to the group that owns the folder you are writing to.
 

Daniyal

Dabbler
Joined
Mar 4, 2019
Messages
18
You can't link users and groups in a jail to them in freenas. You have to create them in the jail.

I would also suggest not following these instructions. They are not very simple or good. Best way is to just add the sonarr user in the jail to the group that owns the folder you are writing to.

Okay a little slow so please be patient with me.. if the folder permissions are set to user: daniyal, group: GreatApe.. I should go into accounts and add a sonarr user to GreatApe?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Okay a little slow so please be patient with me.. if the folder permissions are set to user: daniyal, group: GreatApe.. I should go into accounts and add a sonarr user to GreatApe?
No.

Create a group in the jail with the same gid as GreatApe and in the jail add sonarr to that new group you created.
 

Daniyal

Dabbler
Joined
Mar 4, 2019
Messages
18
No.

Create a group in the jail with the same gid as GreatApe and in the jail add sonarr to that new group you created.

Thank you! Will try and get this done tonight.. have zero programming knowledge or know how so highly appreciated.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Thank you! Will try and get this done tonight.. have zero programming knowledge or know how so highly appreciated.
This isn't programming, this would be system adminstration. Most programmers wouldn't know this stuff. There is a great thread around here or possibly a resource that talks about permissions and jail setup for Plex, sonarr, ect. Do a quick search in the resources section.
 

Daniyal

Dabbler
Joined
Mar 4, 2019
Messages
18
This isn't programming, this would be system adminstration. Most programmers wouldn't know this stuff. There is a great thread around here or possibly a resource that talks about permissions and jail setup for Plex, sonarr, ect. Do a quick search in the resources section.

Thank you, found the post. Appreciate all the guidance.
 

Daniyal

Dabbler
Joined
Mar 4, 2019
Messages
18

Death Dream

Dabbler
Joined
Feb 18, 2019
Messages
24
The dataset you are using as the mount point can be made so the owner is "nobody" and the "other" has write access. I'm using the same dataset for multiple plugins that need the same rights. This was just the easy option for me.
 

Attachments

  • NobodyPermissions.JPG
    NobodyPermissions.JPG
    21 KB · Views: 481

Daniyal

Dabbler
Joined
Mar 4, 2019
Messages
18
The dataset you are using as the mount point can be made so the owner is "nobody" and the "other" has write access. I'm using the same dataset for multiple plugins that need the same rights. This was just the easy option for me.
did you change the permission on the main pool or the data set e.g. media?
 
Top