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.
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.
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
user plex is a member of that group and PMS restarted after the addition.
the group permissions allow writing, e.g
– 755 → 775
– 644 → 664
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 {} \;
“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]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)
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?
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?
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.