Plex did not create a linux user for itself?

Server Version#:1.30.0.6486

I have a Plex installation on Ubuntu 20.04.4 LTS running headless HTPC. Plex works fine for serving files but I cannot get DVR to worry because of permission issues “no write access to destination.”

Reading online, I’m seeing that there is supposed to be a user “plex” on the machine to have permissions assigned, but there doesn’t appear to be any such user on this machine. I thought plex was supposed to create a user?

Grep seems to show that everything “plex” is being run from root. What’s going on here?

Ultimately I’m trying to get the Live TV DVR working. Thanks.

@ChuckPa

You did a snap install.

1 Like

I… think you’re right!

What do I do about it?

sudo snap remove plexmediaserver --purge

Now download from https://plex.tv/downloads

To install: sudo dpkg -i put_filename_here.deb

It’s too bad Ubuntu pushes snap… I also did a snap install first not understanding the hassle that I was getting in to.

If you don’t mind fussing with it, you can rummage down into /var/snap and move the server instance to /var/lib where it belongs (and change the ownership) aftrerwards

Did the purge and reinstall like you suggested, seems to have worked once I re-hooked up my libraries. Now I am back to the original problem of not having write access to the destination.

write access by which username to which destination ?
Specifics / actual example please

Oh, sorry. Have Plex DVR pointing to the /media/MYMEDIA/TVDVR folder, same place that my downloaded TV shows end up. When I schedule a recording via the DVR the recording fails and the message is “no write access to desitnation.” I suppose it’s the plex user that I’m having issues with

Look at the group which owns those directories

Make sure:

  1. user plex is a member of that group and PMS restarted after the addition.
  2. the group permissions allow writing, e.g
    – 755 → 775
    – 644 → 664
  3. It’s usually advisable to set the setgid bit on all existing directories in there too.
    Doing so ensures new directories will be created with the same perms and ownerships.

essentially

cd /top/dir
find . -type d -exec chmod 6775 {} \;   # setuid/gid bits included in chmod
find . -type f -exec chmod 0664 {} \;
1 Like

“ls -al” on my media directory returns:
drwsrwsr-x 23 [myusername] [mygroupname] 4096 DEC 23 20:48 [TVFolder]

“grep [mygroupname] /etc/group” returns a list of entries, including one that says
[mygroupname]:x:1000:plex
which I assume means that the user plex is a member of the group.

Running the commands you listed above from within the TV media folder result in a brief pause and they don’t throw errors so I’m assuming they stuck. PMS still says “no write access to destination” when I try to record DVR.

Do I need to be logged in as plex or something? There could be some fundamental linuxism that you guys just know but escapes me.

you can ‘become’ the plex user (no privileges or environment inherited) by

sudo bash
su -s /bin/bash plex
#
#  Now you can safely go poking around and see where you can "touch x; rm x"

Without logs and traversing every directory in full path, it’s hard to say where it’s getting ‘cut off’ at.

Personally, I avoid /media because the automounter is notorious for exclusivity to your username regardless the privilege bits set. (it’s an exclusive mount UNLESS the mount is performed by ‘root’ in /etc/fstab)

1 Like

I’m all ears for suggestions! I just installed the raw media storage drive last night. The only purpose for this drive is bulk storage of media… I’m not married to any particular location or parameter. Is there someplace that works better for you?

Hint: ANY top-level-directory which doesn’t conflict with something else AND makes sense to you :+1:

I have /nas as the TLD for the boxes and then /usb for the USB devices.

It’s really however your mind and fingers work best :slight_smile:

1 Like

Oh boy, I’m going to need to digest this. I have all my media elsewhere so if I need to start fresh with this media drive I can.

Take your time.

There is a quite the collection of Linux Tips up there.

Use whatever applies, Ask if you need something.

1 Like

I get why it’s a good idea not to have things point to /media/. I went all the way through the process, set permissions (I think) and everything.

I guess I’m curious as to why one would mount the /dev/sda1 as read-only… doesn’t that prevent one from adding media files to it, or no? I can’t add files to the folder through the file explorer.

At any rate, while I was able to link up the libraries again and stream, I still can’t record to DVR. “No write access to destination” is the PMS error.

Dumb noob question: if NTFS drives don’t require permissions to be set, is it silly to reformat the media storage drive to NTFS?

Grab me the log files please (Settings - Server - Troubleshooting - Download Logs)

Attach the ZIP it gives you so I can see exactly what it’s complaining about and guide you

As for mounting read-only.

  1. Main media library is mounted RO.
  2. If I had DVR capability, it would be a separate area with RW

I think I see, re the read-only bit. The logs are attached here. Hopefully this helps. And thank you for all your time on this.
Plex Media Server Logs_2022-12-23_22-50-42.zip (2.2 MB)
t

Well, wait a moment… you said the DVR should aim to a different area with RW? Right now it points to the same TV folder inside the media library folder.