I am running plex (1.18.4.2171) with another owner than the standard plex user since always and never had any issue upgrading plex.
However, today trying to update to 1.18.5.2260, I got the following error
Preparing to unpack plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb ...
Removed /etc/systemd/system/multi-user.target.wants/plexmediaserver.service.
PlexMediaServer install: Pre-installation Validation.
**PlexMediaServer install: Error: "/var/lib/plexmediaserver/Library/Application Support" is not owned by "plex", UID: 112. Found "myuser" UID: 1000 . Please correct before continuing.**
dpkg: error processing archive plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb (--install):
new plexmediaserver package pre-installation script subprocess returned error exit status 1
Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service → /lib/systemd/system/plexmediaserver.service.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
plexmediaserver_1.18.5.2260-056ab4be9_amd64.deb
I see in the changelog the following entry (Ubuntu/Debian) Improve installation in non-standard environments.
I guess it might be related to this, but in my opinion, it is not such an improvement.
David,
If you refer to the Plex Media Server installation update issues thread, you’ll find that there is a condition where PMS is legitimately configured without being owned by username plex. That condition has been reduced to a Warning.
In the above text message from Preinstallation verification, it’s telling you it didn’t find any trace of ownership change from user plex to myuser.
I am interested in understanding your configuration and what it is misunderstanding about your configuration. It should have found and digested your systemd override.conf file.
Can you share a bit about how you have PMS configured?
However, following Tiebierius’ post, I looked up the override.conf file and applied this solution.
Therefore, I removed the local.conf, added a override.conf
# Identify this as a service override
[Service]
# These values are only needed if you wish to change user & group
User=myUser
Group=myUser
I left myUser as the owner of the /var/lib/plexmediaserver/ as I tried to change the owner as plex user but plex wasn’t starting due to read/write issues, I hope this is correct.
Reloaded systemctl and restarted plex server, I was now able to update plex successfully.
So it’s all good now.
/etc/systemd/system/plexmediaserver.service.d/local.conf did not work
/etc/systemd/system/plexmediaserver.service.d/override.conf did work
Which distro & version this is ?
As for setting ownership of all directories and files under PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR (/var/lib/plexmediaserver/Application Support) to be the User= and Group= values is a required step.
David,
Then good. I will need tighten up on the allowed .conf files.
I was trying to be generous and retain backward compatibility by accepting the *.conf file found (provided there is only 1 file present in plexmediaserver.service.d.
It seems that systemd has advanced a bit and I need check again how each of the distros handle it. When this was first written, they did allow local.conf but now that appears to have been deprecated. Before I change to reflect that, I want to be certain I’m in sync with what should be.