Customizing - Questions on override.conf

I have a newly built Plex Media Server running on a Raspberry Pi 4B. If it’s relevant, I’m running the 2021-01-12 build of Raspberry Pi OS. The Pi has a 5 TB USB drive attached that I’m using to store my media libraries.

I’m going to be doing a lot of manual copying of media from other sources to the PMS libraries on the Pi using the Pi’s console. When performing some of these copy operations, the file ownership was being set to pi:pi instead of the required plex:plex. As a result, I had to change file ownership of the new files/folders in the libraries after every copy before the PMS could “see” the files. This quickly got old so I decided to change the PMS to run as “pi” instead of “plex” following the steps in this article.

Everything is working after my changes. Since I’m new to Plex and very green with Linux, I want to make sure that everything I did, I did correctly and that I didn’t miss anything that will bite me later.

Some of my configuration information…

  • My 5 TB USB drive is mounted as /media/pi/external-usb.
  • All of the libraries are located under a top-level “Libraries” folder.

Here is an abbreviated list of the steps I performed…

  • Changed ownership of “Libraries” and everything under it using this command…

sudo chown -R pi:pi /media/pi/external-usb/Libraries

  • Created directory /etc/systemd/system/plexmediaserver.service.d and in it, created override.conf containing the following…
[Service]
User=pi
Group=pi

Changed the ownership of the /var/lib/plexmediaserver and everything under it using this command…

sudo chown –R pi:pi /var/lib/plexmediaserver

Rebooted

As I mentioned earlier, everything works. Now, my questions…

Q1: I’m unsure what the last “UMask=0002” line in the example override.conf does and if it’s necessary in my configuration. Would someone mind explaining what this setting does and if I need to add it?

Q2: In the “Special Considerations” section, would someone be able to clarify this…

Containers - Hardware transcoding from within containers requires special handling unique to each container type to ensure the CPU’s GPU (ASIC) is properly mapped and available in /dev/dri where PMS expects it. Group membership requirements must also be satisfied.

Appreciate any assistance!

Thanks.

UMask changes the default masking for files created.

The Linux default for data files is 644. (only you can Read/Write files)

On Destkop systems, where you run as your username & group and Plex runs as its own username & group, setting UMask=0002 allows you and plex to use a shared group name, e.g. Group=media of which both you and Plex are members.

If you’re running everything on a Pi as pi, then UMask doesn’t matter.
It would be the same as setting User=chuck and Group=chuck on my workstation.

Containers use an abstracted file system (chroot()). You must map the real world /dev/dri into the chroot() environment of the container.

If you’re running on a Pi, which doesn’t have much CPU power in the first place, why are you considering wasting CPU in the container? It doesn’t buy you anything except added complexity. If the argument is “So I can move it to another machine” then , on linux, that is moot because a tar.gz of the Library directory is more portable than the container. Additionally, most folks don’t move their servers around once setup and running.

Thanks for the quick response and clarification on the UMask setting.

Regarding containers, unless they are a default option, I’m not using them. Since they were mentioned in the article and I didn’t know what they were, I just wanted to make sure I didn’t need to do/check any of the items listed.

I forgot to ask, as far as changing ownership of files/folders from “plex” to “pi”, do I need to make changes anywhere other than /var/lib/plexmediaserver or is that the only location?

Thanks again.

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