Server Version#: 4.30.2
Player Version#:
Plex Media Server Databases_2020-06-23_19-19-37.zip (2.0 MB) Plex Media Server Logs_2020-06-23_19-19-31.zip (5.1 MB)
Have my ubuntu system setup to automount my synology. I have read/write access for my user and group. The folder for tv shows directory disappears but content remains on the server. If I click refresh on the browser and check the directory it’s there again. I think this is a bug in plex and have attached my logs.
I have been in touch with synology to see if it’s an issue with how I’m mounting the nas and they say that it’s a plex bug. Not sure if that’s true but I never had this issue with mac and windows mounting synology nas.
This is not a BUG. This is a user administration issue.
Mounting NFS network shares for Plex use on Linux .
The basic checklist
A. Prepare the NAS:
B. Create a ‘mount point’ directory structure on your Linux machine which will be where all your media shares are grafted and made available for Plex use.
C. Create an entry in /etc/fstab for each share you wish to mount.
D. Mount and debug as needed
A. Prepare the NAS.
This is unique to each NAS. In general, you only need grant read permission. Should you desire Read/Write for yourself, …
Mounting CIFS network shares for Plex use on Linux .
The basic checklist
A. Prepare the NAS
B. Install , if required, cifs-utils (or appropriate client) on the Plex server system.
C. Create the CIFS/SMB credentials file for use in /etc/fstab
D. Create a ‘mount point’ directory structure on your Linux machine which will be where all your media shares are grafted and made available for Plex use.
E. Create an entry in /etc/fstab for each share you wish to mount.
F. Mount and debug as …
The most important aspect is that user plex
, in group plex
(Linux is strict on security by nature), can see the mounts. Your username and user plex
are distinct ‘users’ to Linux and, as such, subject to Linux default security mechanisms.
Mac runs PMS as your username.
Windows has no ‘username’ per se.
When you say “automount”, are you referring to a configuration within /etc/fstab, or are you referring to the automounter facility, generally configured in /etc/auto* ?
I’m hard mounting an NFS share from a Synology device on CentOS 7 without issue. Your description of the problem leads me to suspect that you’re trying to use the automounter facility, and I’m not sure that’s going to work well, PMS expects the share to always be mounted. AutoFS does have it’s share of issues as well.
Edit: pay close attention to @ChuckPA ’s response.
Where it says to share permissions for plex on nas and export them, how do I do that?
I was using cifs and had permissions set to 775 and and set chown to gordon:gordon which worked perfectly. When I use nfs it changes ownership to root
Then use CIFS. There is no iron-clad rule HOWEVER , CIFS only supports one username so you must make the choice “gordon” or “plex”.
so can I run plexmediaserver as user gordon?
absolutely.
You need not use all the customizations I show in this How-To.
You will need to change the ownership of /var/lib/plexmediaserver
(as it shows) to match your new username.
Customizing your Plex configuration on systemd based systems
This information is intended for those systems where cat /proc/1/comm returns systemd.
On systems which use Systemd (Ubuntu 16+, Fedora, Centos 7, Debian 8,) you create this customization file which SystemD reads prior to launching PMS. This file is independent of the default configuration and service control mechanisms in /lib/systemd/system/plexmediaserver.service. Your customization override is preserved across updates, uninstal…
Read this How-To thoroughly and completely before starting. Understand the process and steps which all must come together in sequence.
Thanks, I’ll have a read over that.
is it necessary to change the data directory?
gordon@Ubuntu:~$ ps aux | grep “plex”
gordon 4519 4.5 0.2 2278188 66848 ? Ssl 21:41 0:00 /usr/lib/plexmediaserver/Plex Media Server
gordon 4553 7.7 0.1 1869012 50956 ? SNl 21:41 0:01 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-69560ce1e/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.19.4.2902-69560ce1e /usr/lib/plexmediaserver/Resources/Plug-ins-69560ce1e/System.bundle
gordon 4590 0.0 0.0 511704 13996 ? Sl 21:41 0:00 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.19.4.2902-69560ce1e 32600 /waitmutex
gordon 4624 5.5 0.1 958556 45756 ? Sl 21:41 0:00 Plex Plug-in [com.plexapp.agents.imdb] /usr/lib/plexmediaserver/Resources/Plug-ins-69560ce1e/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.19.4.2902-69560ce1e /usr/lib/plexmediaserver/Resources/Plug-ins-69560ce1e/PlexMovie.bundle
gordon 4665 0.0 0.0 17536 732 pts/0 S+ 21:41 0:00 grep --color=auto plex
You’re only changing the User , correct?
If so, your file /etc/systemd/system/plexmediaserver.service.d/override.conf
will contain:
[Service]
User=gordon
Group=gordon
From here, with PMS stopped,
sudo chown -R gordon:gordon /var/lib/plexmediaserver
sudo systemctl daemon-reload
sudo systemctl start plexmediaserver
Is there a command that tells me what user plex is running as?
ps -ef | grep -i plex
The username will be in column 2
ps aux
is more BSD syntax than Linux.
please copy/paste from the console, bracketing with ``` on the preceding and succeeding lines. I can’t read that screenshot.
```
paste text here
```
gordon@Ubuntu:~$ ps -ef | grep -i plex
gordon 5025 1878 0 21:43 ? 00:00:01 /usr/bin/Plex_Media_Player.AppImage
gordon 5066 1878 0 21:43 ? 00:00:00 /tmp/.mount_Plex_M5QEYcM/usr/bin/pmphelper
gordon 7212 1 1 21:55 ? 00:00:02 /usr/lib/plexmediaserver/Plex Media Server
gordon 7247 7212 1 21:55 ? 00:00:02 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-69560ce1e/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.19.4.2902-69560ce1e /usr/lib/plexmediaserver/Resources/Plug-ins-69560ce1e/System.bundle
gordon 7286 7212 0 21:55 ? 00:00:00 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.19.4.2902-69560ce1e 32600 /waitmutex
gordon 7329 7212 0 21:55 ? 00:00:00 Plex Plug-in [com.plexapp.agents.imdb] /usr/lib/plexmediaserver/Resources/Plug-ins-69560ce1e/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.19.4.2902-69560ce1e /usr/lib/plexmediaserver/Resources/Plug-ins-69560ce1e/PlexMovie.bundle
gordon 7818 2208 3 21:58 ? 00:00:01 /tmp/.mount_Plex_MKMANgo/usr/bin/plexmediaplayer
gordon 7822 1878 3 21:58 ? 00:00:01 /usr/bin/Plex_Media_Player.AppImage
gordon 7866 7818 0 21:58 ? 00:00:00 /tmp/.mount_Plex_MKMANgo/usr/libexec/QtWebEngineProcess --type=zygote --webengine-schemes=qrc:sLV --lang=en-US
gordon 7868 7866 0 21:58 ? 00:00:00 /tmp/.mount_Plex_MKMANgo/usr/libexec/QtWebEngineProcess --type=zygote --webengine-schemes=qrc:sLV --lang=en-US
gordon 7883 7868 4 21:58 ? 00:00:01 /tmp/.mount_Plex_MKMANgo/usr/libexec/QtWebEngineProcess --type=renderer --disable-gpu-memory-buffer-video-frames --enable-threaded-compositing --use-gl=disabled --enable-features=AllowContentInitiatedDataUrlNavigations --disable-features=MojoVideoCapture,SurfaceSynchronization,UseModernMediaControls,UseVideoCaptureApiForDevToolsSnapshots --disable-gpu-compositing --service-pipe-token=9873389678801821825 --lang=en-US --webengine-schemes=qrc:sLV --num-raster-threads=4 --enable-main-frame-before-activation --service-request-channel-token=9873389678801821825 --renderer-client-id=2 --shared-files
gordon 7935 4151 0 21:58 pts/0 00:00:00 grep --color=auto -i plex
Moderator Edit: Added ``` for legibility
Gordon,
When you edit your post, you’ll see the formatting I added at the first and last lines.
This is the best way to share console output text.
Yes, Plex is now running as user gordon