Using the settings suggested in the rc script, the plexmediaserver_tmp directory is set to /tmp. When the media server is started the command install -d -g ${plexmediaserver_group} -o ${plexmediaserver_user} "${plexmediaserver_tmp}" is run, which sets the user and group for /tmp to plex:plex and changes the permissions to 0755 (IIRC), which is not a good thing :) Please change the suggested plexmediaserver_tmp in the rc script to something less intrusive like /tmp/plexmediaerver or /var/tmp/plexmediaserver. Regards, Nikolai
Auto-assigned to maintainer feld@FreeBSD.org
plexmediaserver_tmp is *not* set by default. It is documented how to use it though, displaying setting it to "/tmp". That example should probably be changed to "/var/tmp/plex" as you suggested so someone doesn't shoot themselves in the foot... The actual code in the start_precmd is: if [ ${plexmediaserver_tmp} ]; then export TMPDIR=${plexmediaserver_tmp}; install -d -g ${plexmediaserver_group} -o ${plexmediaserver_user} "${plexmediaserver_tmp}"; fi So if someone declares plexmediaserver_tmp in rc.conf it will attempt to set permissions on that directory. Hopefully they don't set to /tmp, because that's what Plex uses by default anyway for its TMPDIR env. I'll update the example so nobody makes that mistake through copy+paste.
A commit references this bug: Author: feld Date: Fri Oct 3 20:26:46 UTC 2014 New revision: 369936 URL: https://svnweb.freebsd.org/changeset/ports/369936 Log: Adjust documentation for the configurable tmp directory used for transcoding so nobody shoots themselves in the foot and causes /tmp to have its permissions changed... PR: 194120 Changes: head/multimedia/plexmediaserver/files/plexmediaserver.in head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in
Thanks for the report. Change committed.
Thanks for the quick fix and sorry for misreading the rc script.