Server Version#: 1.26.0.5715
Player Version#: Many
I appear to be having some odd permissions issues with transcoding. I’ve set transcoding to run here: /tmp/transcode-tmp
Plex runs as user plex, group nas - correctly. When subfolders get created under transcode-tmp, they usually get created owned by plex/nas. However, every now and then, they are created with the owner being a user. For the life of me, I can’t figure this out, but I think it’s somewhat tied to EAE transcoding.
A couple of days ago I saw this line:
Plex Media Server.log:Apr 19, 2022 08:21:02.077 [0x7fee72b9cb38] INFO - [Transcode/B27C4F64-2F69-48AF-B36A-54B261F8B6C7] CodecManager: starting EAE at "/tmp/pms-abd7f433-3818-4f00-85f7-43cdabcdc7a5/EasyAudioEncoder"
in my logs. First of all - that folder isn’t under /tmp/transcode-tmp, but secondly, that folder was created with the wrong user owning it. Therefore, a couple of days later, I got this error:
Plex Media Server.log:Apr 20, 2022 07:21:50.073 [0x7fee71021b38] ERROR - [Transcoder] [truehd_eae @ 0x7fad0181c6c0] EAE watchfolder is not writable: /tmp/pms-abd7f433-3818-4f00-85f7-43cdabcdc7a5/EasyAudioEncoder/Convert to WAV (to 8ch or less)/7D450ECA-41DF-4FB3-A15F-978256484120_362055-0-test.tmp
It looks to me like there are some scenarios where the transcoder runs as the wrong user - and I can’t, for the life of me, figure out why.
Follow-on: chown plex:nas that entire folder structure, hit play again, get this error:
Apr 22, 2022 17:46:38.054 [0x7fee6b835b38] ERROR - [Transcoder] [truehd_eae @ 0x7f426e6bfb40] EAE watchfolder is not writable: /tmp/pms-abd7f433-3818-4f00-85f7-43cdabcdc7a5/EasyAudioEncoder/Convert to WAV (to 8ch or less)/25866771-107A-49E4-8E45-EC287D13A686_1562897-0-test.tmp
Apr 22, 2022 17:46:38.055 [0x7fee6b0aeb38] ERROR - [Transcoder] Error while opening decoder for input stream #0:1 : Generic error in an external library
Apr 22, 2022 17:46:38.134 [0x7fee6b835b38] WARN - [Transcode] Got a request to stop a transcode session without a valid session GUID.
Apr 22, 2022 17:46:38.321 [0x7fee6b63eb38] ERROR - Unknown metadata type: folder
Apr 22, 2022 17:46:40.058 [0x7fee6b661b38] ERROR - Unknown metadata type: folder
Apr 22, 2022 17:46:42.511 [0x7fee6b835b38] ERROR - Unknown metadata type: folder
Apr 22, 2022 17:46:48.547 [0x7fee6b5b9b38] INFO - AutoUpdate: no updates available
That folder (/tmp/pms-abd7f433-3818-4f00-85f7-43cdabcdc7a5) did not exist 2 minutes ago.
A full restart of PMS appears to have fixed (for now), but something weird is definitely going on. I believe this all started when I changed the location of my transcode folder. I wonder if the /tmp/transcode-tmp/ is screwing with it (the trailing tmp/)?
I replicated what you’re seeing except that I do not have a subdirectory specification.
(I use /dev/shm as my transcoder temp because it’s always there after reboots)
I see:
All video transcoding files go to the Transcoder temp directory as expected.
Dolby conversion temp files (Plex EAE) service are written to /tmp
Directories in /tmp persist after PMS stops but , due to tmpfs rules of /tmp, are removed when the host restarts.
I’ve asked Engineering for clarification.
Query: Did you change the Plex user & group but not reboot the host?
I ask this because, if /tmp is hardwired into the Dolby EAE (which is very likely given that it’s Dolby code) then we have an explanation as to what’s happening and that this occurred only because the UID/GID changed without /tmp being cleared (which is really weird)
Query 2:
PMS makes TMPDIR available to you to customize.
The default TMPDIR is /tmp.
Care to experiment and place (in the service file) Environment="TMPDIR=/path/to/your/transcoder/temp"
I am concerned about how does /tmp/transcode-tmp get created in the case when /tmp is a traditional memory-based tmpfs filesystem. PMS does expect the transcoder temp directory to exist