Plex user uses UID (998) in the special range , and is already assigned (not to plex) on my NAS

Server Version#: PMS 1.40.4.8679
Player Version#:
I have PMS running on Ubuntu 22.04.4, using local disk drives.PMS runs under the “Plex” user which has UID 998 (which is in the special range ie< 1000), and from the shadow file has a password , but the account is locked. I have commissioned an Orico NAS and installed OMV 7.2. I need to create users in OMV with matching UID’s however the UID’s assigned by user creation on OMV (and Ubuntu) are all above 1000 and that system already has a user (systemd-network) assigned to UID 998. I appear to be blocked from using my NAS by the use of a UID from the “system” range (Why is this done?), and not knowing the Plex password. Im contemplating changing the Plex UID to 997, However OMV’s OS wont let me change a UID <= 1000 o below 1000 unless I manually modify the passwd file, and Im not sure what ramifications that might have. Any solutions gladly accepted.

Plex uses the values defined by the host in /etc/login.defs

On Synology, the old values were 1026 or 1027 typically.

Manually change to what you need / want. It’s just a normal User UID/GID.
The important parts are group membership for transcoding and/or dvr.

don’t forget to change any/all files & dirs after you change UID/GID

Followup

Curious why you’re using the Plex UID/GID ?
Media should be owned by your UID.

Are you trying to use SMB on Linux?

In Debian /etc/login.defs is no longer valid. Debian (and therefore Ubuntu) uses PAM, and has done for some time.

Im trying SMB, but thinking hard about NFS for the ubuntu client. (OMV allows both connection types to operate on the same “share” at the same time) . I was initially able to get all clients to see the shared folder via SMB, and windows client could create directories , but the Ubuntu connection could see but not write, particularly the two main apps (tvheadend and plex). That suggested that an NFS share for Ubuntu could work, but NFS requires that user uid’s and pw’s have to be the same on client and server, so Im not pursuing that yet…Ive tried adding a shared group to plex user, mounting the share using the shared user, changing the group of the mount point to the shared group and setting the SGID on the mount point. Still cant get the SMB share to allow write by ubuntu.

I would very much suggest you use NFS instead of SMB.

I have one NFS mount for media.

# Master Media mount
192.168.0.20:/vol/media     /glock/media       nfs defaults,sec=sys,rw,auto,async,x-systemd.after=network-online.target,nofail,bg 0 0

This mounts the media directory NFS
What I’ve done on the server side is:

  1. Directories have 755 permissions (I Read/Write the directory with ‘rwx’)
  2. Files have 644 permissions (I Read/Write the file)
  3. Given the “x55” and “x44” permissions result in read-only for everything else
    (This includes Plex across the network)

On the server, the /etc/exports is very simple.

  1. I export the directory with R/W (so I can use it)
  2. All directories and files have the 755/644 permisions I described above.
  3. All hosts on my network:
    – RW exported,
    – Allow ASYNC transfers
    – Don’t bother checking the into the tree for permissions. Let Linux do that.
    – Allow ‘root’ (for when I use ‘sudo’ across the mount).
/vol/media    *(rw,async,no_subtree_check,no_root_squash)

Nobody else has ever complained about this.
I think that if you use NFS and not try to piggyback on user plex, you’ll be ok.

You can customize PMS to not run as user plex

example

[chuck@lizum ~.2002]$ cat /etc/systemd/system/plexmediaserver.service.d/override.conf 
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/usb/plex"
User=chuck
Group=chuck
[chuck@lizum ~.2003]$

Thanks, Ill examine the nfs route . That sec=sys parm looks like it may help by not requiring the users in omv.
Saw that customisation post too and had a go… didnt seem to have the effect i needed so backed it out,

I had an OMV test machine once. I was able to use NFS without issue.
If I can find a host to use, I’ll spin it up again and show you

Many thanks for the assist
Using your advice above Ive managed to get plex and tvheadend access!
I mount the omv share on /media/NAS. in ubuntu
My omv share is called NAS
The mount is 192.168.1.156:/NAS nfs /media/NAS and your set of parms
I end up with path /media/NAS/NAS/ which I cant write into, and a further subdir /media/NAS/NAS/NFS, which i have full access to Not sure where that NFS directory comes from , but both tvheadend and plex can read and write there, and make subdirs, and plex can delete. Brilliant!

Next, to add smb share for the windows clients.

I prefer not to use /media on Ubuntu or Debian when Gnome w/ Nautilus (automounter) is involved. You get strange results like that.

If I may suggest ?

sudo bash
mkdir /omv
chmod 755 /omv

Now, test mount (command line)

mount 192.168.1.156:/NAS /omv
ls /omv

See if that’s more acceptable.

If not, umount it and mount 192.168.1.156:/NAS/NFS /omv

In my configuration, all my media files are under media' shared folder (comes from /vol/media and the hostname isglockso I mount as/glock/media`

This doesn’t collide with /media and will not get manipulated by Nautilus / automounter

The key here is how you export it (which level) and whether you must specify the full directory path -OR- just the share name.

Now you don’t care which UID/GID is used by Plex. You’re doing all this at the NFS level :slight_smile:

Thanks again, Ill have a play with those.
Yes, the plex guid problem has definitely gone away. :grinning:

Ive been digging a bit to uncover where the mysterious “NFS” directory came from.
I think this post below gives some clues. The exports file on my OMV server (which is using NFS4) exports a root directory as well as the share I created. I was puzzling about that also.

Here’s the link.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.