Server Version#: 1.40.5.8854
Player Version#:
I mounted a new share today and I cannot get the folder to appear in the “Add Folder” list in the “Manage Libraries” tab. I double checked all my permissions and it matches all my other shares. When I log into the bash shell in the docker container, I can see the directory is mounted correctly, I can browse the directory, and I can read the media files in there. When I try to manually add the directory myself in the “Add Folder” list, it does not find any data. Looking for any help here as to what I could be missing.
I am really lost on this one. I tried renaming the folder in the yaml file. I tried mounting it to a different directory. Every time I can all the contents of the folder if I go into docker container, but Plex will not see the folder to add it. Anyone have any ideas on this one?
I tried nfs, same problem. I tried mounting the parent folder, same problem.
@ChuckPa will probably come around and solve this in a second. I’m still Linux lite on skills but it seems to usually be a case of permissions aren’t set correctly. Somewhere Chuck has a bunch of Linux Tips but I can’t find it at the moment. Here’s one that I found that might help though:
Might throw you some ideas while you wait for Chuck!
Good Luck,
Chris
My permissions and ownership should be right thought. That’s why I tried two different file protocols to prove that. When I am in the docker container, everything is owned by the plex user and group and the ugo permission bits are set correctly. The docker bash shell can access all of the files and directories. I have four other shares with one coming from the same system and they have all the same permissions and ownership and work correctly. I tried reordering the mount volumes in the yaml file and that didn’t help either. I am really stumped by this one. I’m hoping for a miracle from @ChuckPa.
Here’s the Linux Tips page
I was able to workaround this issue by taking one of the existing mounts and mounting the parent folder. That still doesn’t explain why I can’t add any new mounts and have them appear in the docker container to plex even though they appear perfectly fine within the bash shell for the plex docker container.
It doesn’t matter which UID/GID owns the files inside the container.
What matters is how that UID:GID maps to the real world.
Here’s the “cheat” method
- My UID:GID is 1000:1000
- I own all the media on the machine & NAS
- I create the container to run as my UID:GID
- By default, the container behaves as if me.
- I now map the
/glock
directory directly into the container
(/glock/media is where all media subdirs are; animated, tv music, movies, etc)
Piece of
sudo docker run \
-d \
--name plex \
--network=host \
-e PLEX_CLAIM="claim-J3YbuBpaBhE9oJS1jsma" \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=1000 \
-e PLEX_GID=1000 \
-e PUID=1000 \
-e PGID=1000 \
-h dockerplex \
-v /usb/dockerplex:/config \
-v /usb/dockerplex/tmp:/tmp \
-v /usb/dockerplex/transcode:/transcode \
-v /vie:/data \
-v /glock:/glock \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass
INFO: /usb
is actually a 2TB SSD on the 10GbE USB port.
If you’re going to use a different UID/GID in the container then I recommend:
find /media/directory -type d -exec chmod 755 {} \;
find /media/directory -type f -exec chmod 644 {} \;
This keep you (the owner) with full RW but all other UIDs & GIDs as read-only.
You can change the chmod as you deem appropriate
I only have PUID and PGID set. Do I need to set PLEX_UID and PLEX_GID set to get this to work?
Your configuration is similar to mine. I have the container set to run as my user account. This doesn’t explain why my four existing mounts work and when I create any new ones, the bash shell in docker shows the correct permissions and can read and write data into the mounts. However, when I am in the plex app, it will not pick up those newly created folders.
open a terminal window, get your ID info
[chuck@lizum docker.2051]$ id chuck
uid=1000(chuck) gid=1000(chuck) groups=1000(chuck),4(adm),24(cdrom),27(sudo),30(dip),44(video),46(plugdev),110(render),122(lpadmin),135(lxd),136(sambashare)
[chuck@lizum docker.2052]$
The primaries are listed first.
How are you mounting? NFS or SMB ?
It looks right to me.
uid=1000(mitchell) gid=1000(mitchell) groups=1000(mitchell),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),105(lxd),994(docker)
My existing mounts are CIFS. The new mount I tried with both NFS and CIFS. It didn’t matter.
CIFS (Windows) ??? on a Linux box? slap slap LOL
CIFS is single-uid (your credentials) unless you expressly state “allow_other”
- Make the directory outside your home dir (NEVER INSIDE)
- chmod the dir to 755
- mount the dir (sudo mount ip.of.nfs.server:/export/path /mount/dir)
- sudo chmod 755 /mount/dir
Now go check it out.
If still not visible, go back and look at how exported.
This is my /etc/exports
. I have it RW so I can store new media.
/vol/media *(rw,async,no_subtree_check,no_root_squash)
It is visible though in the container’s bash shell. It’s not in Plex.
On my ubuntu host, here is what I see:
ls -l /media/plex/
drwxr-xr-x 2 mitchell mitchell 0 Aug 1 19:04 q8movies
drwxr-xr-x 2 mitchell mitchell 0 Aug 21 20:41 q8tv
drwxr-xr-x 2 mitchell mitchell 0 Aug 19 22:38 qmovies
drwxr-xr-x 2 mitchell mitchell 0 Aug 2 11:49 synmusic
drwxr-xr-x 2 mitchell mitchell 0 Aug 21 20:41 syntv
q8tv is the new mount point I am trying to add. The other four are preexisting.
My yaml config file has the following entries:
volumes:
- /media/plex/config:/config
- /media/plex/transcode:/transcode
- /media/plex/synmusic:/data/synmusic
- /media/plex/syntv:/data/syntv
- /media/plex/q8movies:/data/q8movies
- /media/plex/qmovies:/data/qmovies
- /media/plex/q8tv:/data/q8tv
If I go into the bash shell on the plex container, it looks right:
sudo docker exec -it plex /bin/bash
ls -la /data
drwxr-xr-x 2 plex plex 0 Aug 1 19:04 q8movies
drwxr-xr-x 2 plex plex 0 Aug 21 20:41 q8tv
drwxr-xr-x 2 plex plex 0 Aug 19 22:38 qmovies
drwxr-xr-x 2 plex plex 0 Aug 2 11:49 synmusic
drwxr-xr-x 2 plex plex 0 Aug 21 20:41 syntv
When I then look at in plex, it is not showing the q8tv directory:
It doesn’t matter how I name the new directory, where I put it in the container’s filesystem, where it is in the yaml file, or if it is NFS or CIFS. The newly created directory always appears fine in the container’s bash shell, but plex doesn’t want to see it.
As you see there:
/data/syntv/
What happens when you click into it? Do you see the TV series?
If not – Check the NAS.
Yes, all four existing shares are working. I can see data from all the mount points it has in the list and everything looks good. Q, Q8, and Syn are three different NAS devices. The new q8 mount point uses the same mount point and nas as the existing q8 mountpoint.
I am using Ubuntu 24.04 and Docker version 27.1.2, build d01f264.
Here’s a silly question.
Why are you using docker when there’s a native app?
Docker adds a layer of complexity which isn’t needed.
No specific reason. I can use the native app if needed, but I thought it would be easier to manage and maintain a docker image going forward.
I’ve found native to be easier.
It has direct access to the HW (acceleration) and all mounted filesystems.
Plex will run as its native UID:GID (plex:plex) unless you change it.
It will run in /var/lib/plexmediaserver, which I do recommend you change/move.
I have a bunch of Linux Tips I’ve created to cover all these tasks.
While I might be a bit biased (I wrote the debian/ubuntu installer), I find it a lot easier to use overall. You know if there are any major configuration errors at installation time.