Plugins & missing permissions

Status
Not open for further replies.

Quinnx

Dabbler
Joined
Jan 8, 2016
Messages
34
Greetings,

I have installed a number of plugins into the jails and set the mount folders as follows;



upload_2016-1-16_19-10-22.png


However, when sabnzbd tried to extract to the mounted folder it get the permission error below.

upload_2016-1-16_19-7-49.png



After reading

https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/
http://doc.freenas.org/9.3/freenas_jails.html#add-storage
https://forums.freenas.org/index.ph...ll-subsonic-4-8-on-freenas-9-1-1.15016/page-2
And this https://forums.freenas.org/index.ph...issions-to-your-data.27273/page-9#post-213974

The last link to quote;

"By default, most plugins run as a specific user, with a specific UID, and keep their configuration/databases/logs in what I will refer to as a data-directory."
  • SERVICE - USER (UID) - DATA-DIRECTORY
  • transmission - transmission (921) - /var/db/transmission
  • sabnzbd - media (816) - /var/db/sabnzbd
  • sickbeard - media (816) - /var/db/sickbeard
  • sickrage - media (816) - /var/db/sickrage
  • sonarr - media (816) - /var/db/sonarr
  • couchpotato - media (816) - /var/db/couchpotato
  • headphones - media (816) - /var/db/headphones
  • mylar - media (816) - /var/db/mylar
  • xdm - media (816) - /var/db/xdm
  • maraschino - media (816) - /var/db/maraschino
  • htpc-manager - media (816) - /var/db/htpc-manager
  • plexmediaserver - plex (972) - /var/db/plexdata
  • emby-server - emby (983) - /var/db/emby-server
  • subsonic - media (816) - /var/db/subsonic
  • btsync - btsync (817) - /var/db/btsync
  • syncthing - syncthing (983) - /var/db/syncthing

Clearly states that the user media(816) I noticed that I had no media (816) user or group on the system, so I created it and I am kinda stuck from there. I think i want to add the user 'media' to all jails media's folders recursively, but somehow think will fudge it all up.

I have also read the Help section

Figure 13.2c: Adding Storage to a Jail -

But I am unable to just click a jail set and set permissions.

Is there an easy fix to add the user/group 'media' to allow it to read/write all media sets?

Here is the mounted folders permissions

[root@freenas] /mnt/mstata/jails/sabnzbd_1/media# ll
total 515
drwxr-xr-x 6 root wheel 6 Jan 16 14:25 ./
drwxr-xr-x 18 root wheel 22 Jan 16 09:20 ../
drwxrwxr-x 237 1000 1000 237 Jan 13 16:34 Emags/
drwxr-xr-x 2 root wheel 2 Jan 16 14:22 Movies/
drwxr-xr-x 2048 root wheel 2051 Jan 16 18:15 Music/
drwxrwxrwx 258 1000 1000 268 Jan 15 15:27 Series/

And here is where it reads the mounts from

[root@freenas] /mnt/Toshiba4x3tb# ll
total 657
drwxr-xr-x 11 1000 1000 11 Jan 11 19:48 ./
drwxr-xr-x 5 root wheel 160 Jan 16 15:57 ../
drwxrwxrwx 262 1000 1000 271 Jan 11 19:49 1/
drwxrwxr-x 3 1000 1000 3 Sep 22 18:23 Audio/
drwxrwxr-x 237 1000 1000 237 Jan 13 16:34 EMags/
drwxrwxr-x 15 1000 1000 19 Dec 6 17:40 Ebooks/
drwxrwxr-x 45 1000 1000 45 Jan 15 22:37 Movies/
drwxr-xr-x 2048 root wheel 2051 Jan 16 18:15 Music/
drwxrwxrwx 258 1000 1000 268 Jan 15 15:27 Series/
drwx------ 2 root 1000 2 Jan 16 10:16 incomming/
drwx------ 2 root 1000 2 Jan 16 10:16 nzb/


Thanks for your time!
 

Quinnx

Dabbler
Joined
Jan 8, 2016
Messages
34
Solved!

Added permissions to the route level Jails, thus overall fixing it. (however badly it was of me)

upload_2016-1-16_20-10-57.png


But wheeehy, its working!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Solved!

Added permissions to the route level Jails, thus overall fixing it. (however badly it was of me)

View attachment 10033

But wheeehy, its working!
your jail is now broken, I bet the services won't start with a restart of the jail.

never change the ownership or permissions of the jail datasets. only ever change ownership/permissions for datasets mounted into your jail.
as for why the "media" user doesn't exist on freenas, read the second point under "Facts"
 

Quinnx

Dabbler
Joined
Jan 8, 2016
Messages
34
your jail is now broken, I bet the services won't start with a restart of the jail.

never change the ownership or permissions of the jail datasets. only ever change ownership/permissions for datasets mounted into your jail.
as for why the "media" user doesn't exist on freenas, read the second point under "Facts"

Hi thats great & yes, none of the jails are working anymore.

Now, i can restore the config as i took a backup, but I will still have the same issue as before.

Can you give me any pointers on how to do it correctly, or answer why the the user media or none of the jail apps did not create any users for their respective jails?

Thanks.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I suggest you create a dataset for you downloads/media that you mount into the jail somewhere like '/mnt/media'.
You can adjust the ownership/permissions of this dataset using one of the Solutions from the thread you linked and it won't break the jail.
Then in sabnzbd's settings just set your download directories accordingly.

As for why it doesn't create a user on the FreeNAS host, it's because freenas and your jails are different (virtual) operating systems. See point 2 under "Facts".
 
Status
Not open for further replies.
Top