Plex in Docker container not seeing volume contents?

I’m having some trouble getting my files into the Plex library. I have Plex running within a Docker container on LibreElec and I’m trying to get it to read the library from a NFS share, but it doesn’t see the files within that directory. I have the NFS share mounted in LibreElec via system.d like so:

[Unit]
Description=Mount NFS SHARE
Requires=network-online.service
After=network-online.service
Before=kodi.service

[Mount]
What=192.168.1.3:/volume1/Media
Where=/storage/mount
Options=
Type=nfs

[Install]
WantedBy=multi-user.target

This is all working fine from within Kodi, I can see all the folders and their contents. I have mapped the following volumes to the Plex Docker container:

/storage/mount/Movies > /data/movies
/storage/mount/TV Series > /data/tvshows

From within Plex, the library remains empty. It won’t see files in either directory. However, when I ssh into the docker container and ls -al on -for example- the /data/tvshows directory, it lists all the contents just fine:

root@Plex-LibreELEC:/data/tvshows# ls -al
total 40
drwxrwxrwx  7 nobody users 4096 Oct  8 08:25  .
drwxr-xr-x  5 root   root  4096 Oct  8 10:43  ..
drwxrwxrwx  4 nobody users 4096 Jan 28  2017 'Band of Brothers'
drwxrwxrwx  3 nobody users 4096 Apr 11 12:28 'Blue Planet II'
drwxrwxrwx 11 nobody users 4096 Apr 15  2019 'Game of Thrones'
drwxrwxrwx  4 nobody users 4096 May 16 18:32 'Gordon, Gino and Fred - Road Trip'
drwxrwxrwx  6 nobody users 4096 Dec 12  2019 'The Grand Tour (2016)'

So the volume is readable by the Docker container, but somehow Plex won’t see the contents. I have tried delaying the Plex service untill the volumes are mounted by editing docker.linuxserver.plex.service:

[Unit]
Requires=storage-mount.mount
After=storage-mount.mount

I tried the same for docker.service, or in reverse, the storage-mount.mount:

[Install]
RequiredBy=docker.linuxserver.plex.service

Still, no bueno. Am I missing something?

Ok, so something seems to be changing the permissions of the folders in the Docker container.

When logged in as root, here is the contents of /data:

root@Plex-LibreELEC:/data# ls -al
total 28
drwxr-xr-x  5 root   root  4096 Oct  8 11:15 .
drwxr-xr-x  1 root   root  4096 Oct  8 11:15 ..
drwxrwxrwx 25 nobody users 4096 Oct  8 08:29 movies
drwxrwxrwx   2 nobody users 4096 Feb 27  2017 photos
drwxrwxrwx   7 nobody users 4096 Oct  8 08:25 tvshows

Then, switching to the user nobody, returns the following:

nobody@Plex-LibreELEC:/data$ ls -al
total 28
drwxr-xr-x  5 root   root  4096 Oct  8 11:15 .
drwxr-xr-x  1 root   root  4096 Oct  8 11:15 ..
d--------- 25 nobody users 4096 Oct  8 08:29 movies
drwxr-xr-x  2 nobody users 4096 Feb 27  2017 photos
d---------  7 nobody users 4096 Oct  8 08:25 tvshows

Without changing anything, a minute later, it’s:

nobody@Plex-LibreELEC:/data$ ls -al
total 28
drwxr-xr-x  5 root   root  4096 Oct  8 11:15 .
drwxr-xr-x  1 root   root  4096 Oct  8 11:15 ..
drwxrwxrwx 25 nobody users 4096 Oct  8 08:29 movies
drwxr-xr-x  2 nobody users 4096 Feb 27  2017 photos
d---------  7 nobody users 4096 Oct  8 08:25 tvshows

I went back to root and chmod 777 all folders and now Plex is able to see the contents. But after a reboot, the permissions are changed again.

I would recommend you join our discord and visit #other-support for help with setting your nfs up properly. You can’t really do what you’re trying to do (as you can see) and we dont offer NFS support. That said, 777 is also never the appropriate fix, in the end though, this is purely an NFS permissions issue and would be fixed on the system HOSTING the shares, not on the system accessing the shares.