Jellyfin Forum
Jellyfin container with custom user doesn't support web-plugins - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Jellyfin container with custom user doesn't support web-plugins (/t-jellyfin-container-with-custom-user-doesn-t-support-web-plugins)



Jellyfin container with custom user doesn't support web-plugins - Eeeeelias - 2024-09-17

Hey all,
I am running Jellyfin (10.9.10) as a container with a custom UID & GID (here: 1000:1000) as described in this example: https://jellyfin.org/docs/general/installation/container/#using-docker-compose.
So far so good, jellyfin itself works normally, things like image scrubbing also work as expected.
I did notice, however, that plugins that edit the web-interface (e.g. add skip intro button) will not work any more. The button is not being displayed any more. The same thing happens to the button "In Player Episode Preview" adds - also gone. This is obviously due to some kind of permission error. In the logs, I get confirmation:
Code:
[2024-09-17 20:22:39.779 +02:00] [ERR] [4] Namo.Plugin.InPlayerEpisodePreview.InPlayerEpisodePreviewPlugin: Encountered exception while writing to "/jellyfin/jellyfin-web/index.html": "System.UnauthorizedAccessException: Access to the path '/jellyfin/jellyfin-web/index.html' is denied.
I tried to attach logs but I'm not allowed to somehow?

I did manage to find a solution:
Code:
docker exec -u 0 -it jellyfin bash
and then
Code:
chown -R 1000:1000 /jellyfin/jellyfin-web

This immediately restores the functionality of both plugins upon restart. It feels like it's not the right way of handling this issue, however, since I'm just brute-force changing the user to whatever I set (and will not survive docker-compose down).
Thus, my question: Is there a more proper way to use a custom user with jellyfin? Or is this an issue with plugin-creators?

I also tested this with a brand-new (debug) instance of jellyfin, it shows the same behaviour.

Thanks for your help!


RE: Jellyfin container with custom user doesn't support web-plugins - TheDreadPirate - 2024-09-17

The "user" parameter only controls what user the container runs as. And that user only needs permissions to writeable portions of the container, /config and /cache. The rest of the container is, essentially, read-only to whatever user is defined.

I tested with the Linuxserver image of Jellyfin, since it uses PUID and PGID environment variables, but I wasn't able to get the namo plugin to overwrite index.html.

You could explore having docker run post startup scripts/commands. But I'm not certain when during the startup process those run. Whether they run when the container starts, but before Jellyfin finishes starting, etc.