Changing the user of an application

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
I have plex-pms installed. I have mounted storage into the plex jail (not read-only).

The mount point storage permissions are set to owner media / group media, owner RWX, group RWX, other RX

I guess I need to change plex-pms to run as "media" user instead of "plex" user that it currently runs as, or I need to add the "plex" user to the "media" group.

Does anyone know how to do this so plex can write to the storage? The 'plex' user doesn't exist in FreeNAS -> account -> users

Plex-pms was installed with pkg, not a plugin.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Thanks for the reply, that was quick!

816 already exists, that is user "media".

Is there a command i can use to get the user ID from the user name, so i can see the UID for "plex" ?
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
OK I figured that out:

root@plex:/ # id plex
uid=972(plex) gid=972(plex) groups=972(plex)

So in FN GUI I created a group called "plex" with ID 972. Then i created a user called "plex" with ID 972 and primary group as "plex".

In the groups list, i selected the "media" group, clicked "members" and added "plex".

So now "plex" should be a member of the "media" group.

I then restarted the plex jail.

However, plex-pms is still complaining it cant write to disk, uuugh.

EDIT: I set the mount to be owner/group = "plex" and plex could write to the disk, then changed it back to "media" (as other jails also write to this dataset as "media"), and plex again fails.
 
Last edited:

Monkey_Demon

Explorer
Joined
Nov 11, 2016
Messages
85
Are you still having this problem?

I think your trouble lies in wanting to allow the plex user to write on your mount point(s) from within the plex jail. This tutorial recommends against that: "Since Plex doesn't need to make modification to your data, it's best to make the mount read-only as an additional protection."

Instead, do all your writing (e.g., adding media) by sharing your media files and attaching them as a share to your operating system. (I've long forgotten how Windows handles such things, but on a Mac use Finder's Go > Connect to Server to attach your media directory on your FreeNAS device to your Mac as a Finder folder. And do all your file manipulation there.

A big advantage of doing things this way is that you can use an interface designed for manipulating files (copying, moving, renaming, etc.).
 
Top