Permissions issues in SABnzbd

Status
Not open for further replies.

derekzchu

Dabbler
Joined
Dec 5, 2014
Messages
23
So i tried to follow https://forums.freenas.org/index.ph...-permissions-set-up-example-for-dummies.8894/ but ran into some hiccups regarding my jails/plugins.

Specifically, I created a dataset for all my media with user "derekzchu" as owner and "media" as the group owner. I export the media dataset to SABnzbd:

source: /mnt/vault/media/downloads
dest: /media/downloads

In SABnzbd, i have a tv category where i specify the absolute path "/media/downloads/tv shows".

However, now during post processing in SABnzbd, I continually get the error "Cannot create final folder /media/downloads/tv shows/NameOfShow.avi"

This wasn't happening before I started assigning permissions so I'm pretty sure I stuck in misconfiguration land. Any pointers?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So i tried to follow https://forums.freenas.org/index.ph...-permissions-set-up-example-for-dummies.8894/ but ran into some hiccups regarding my jails/plugins.

Specifically, I created a dataset for all my media with user "derekzchu" as owner and "media" as the group owner. I export the media dataset to SABnzbd:

source: /mnt/vault/media/downloads
dest: /media/downloads

In SABnzbd, i have a tv category where i specify the absolute path "/media/downloads/tv shows".

However, now during post processing in SABnzbd, I continually get the error "Cannot create final folder /media/downloads/tv shows/NameOfShow.avi"

This wasn't happening before I started assigning permissions so I'm pretty sure I stuck in misconfiguration land. Any pointers?
Sabnzbd runs as the user 'media' UID=816, in the jail. It needs write permission to "downloads/tv shows" directory.

Either..
1) the directory needs to be owned by UID 816
2) the directory has group writing enabled. And media, in the jail, is in a group that corresponds to the GID of media outside of the jail
3) The directory has everyone writing enabled

Note - User / Group databases are not shared between the FreeNAS host and jails. All the host and the jail share are files, which which have an assigned UID/GID.
 

derekzchu

Dabbler
Joined
Dec 5, 2014
Messages
23
Sabnzbd runs as the user 'media' UID=816, in the jail. It needs write permission to "downloads/tv shows" directory.

Either..
1) the directory needs to be owned by UID 816
2) the directory has group writing enabled. And media, in the jail, is in a group that corresponds to the GID of media outside of the jail
3) The directory has everyone writing enabled

Note - User / Group databases are not shared between the FreeNAS host and jails. All the host and the jail share are files, which which have an assigned UID/GID.

Hey Joshua thanks for the reply. I changed my /etc/group file and edited my media user to be GID of the media group in my freenas to no avail. Is there something additional I need to do to get that to work?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hey Joshua thanks for the reply. I changed my /etc/group file and edited my media user to be GID of the media group in my freenas to no avail. Is there something additional I need to do to get that to work?
So you're trying to use solution 2.

* On the FN host you edited /etc/group directly, why couldn't you use the WebUI?

* You need to apply this new GID to the directory/dataset(recursively). The jail doesn't know anything about the group database of the host, just the (GID) ownership of the files. Which wouldn't have been changed unless you forced it to happen at some point.

* Does the download directory/dataset(recursively) have group write enabled?
 

derekzchu

Dabbler
Joined
Dec 5, 2014
Messages
23
So you're trying to use solution 2.

* On the FN host you edited /etc/group directly, why couldn't you use the WebUI?

* You need to apply this new GID to the directory/dataset(recursively). The jail doesn't know anything about the group database of the host, just the (GID) ownership of the files. Which wouldn't have been changed unless you forced it to happen at some point.

* Does the download directory/dataset(recursively) have group write enabled?

Hey Josh,

Yeah i'm trying solution 2. The edit of /etc/group directly was in the sabnzbd jail. I changed it from:

media:*:816
to
media:*:1002

where GID 1002 is already setup as the media group in the freenas host. This same media group is the group owner of my datasets I exported to the SABnzbd jail. I double checked and saw that my dataset does have the group write enabled recursively.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hey Josh,

Yeah i'm trying solution 2. The edit of /etc/group directly was in the sabnzbd jail. I changed it from:

media:*:816
to
media:*:1002

where GID 1002 is already setup as the media group in the freenas host. This same media group is the group owner of my datasets I exported to the SABnzbd jail. I double checked and saw that my dataset does have the group write enabled recursively.
Are you sure that's how you change GIDs in FreeBSD, I only ever remember editing that file directly on linux? I think you're supposed to do everything though pw (or it's specific versions like usermod), cause there's an additional sqlite file somewhere that /etc/group is supposed to match.

I suggest you..
* return /etc/group to how it was
* create a group in the jail with GID 1002, maybe called media_fn
* add the media user in the jail, to that newly created group
https://www.freebsd.org/doc/handbook/users-synopsis.html
 
Status
Not open for further replies.
Top