Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Add read-only and non-root support - #127

Open
tkimball83 wants to merge 1 commit into
linuxserver:masterfrom
tkimball83:non-root
Open

tkimball83 wants to merge 1 commit into
linuxserver:masterfrom
tkimball83:non-root

Conversation

@tkimball83

@tkimball83 tkimball83 commented Oct 25, 2026 •

Copy link
Copy Markdown

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

  • An LLM assisted me in writing the code or text for this PR

  • An LLM agent wrote the code or text for this PR


Description:

Adds read-only and non-root support, following what docker-plex already does. svc-emby only runs s6-setuidgid abc when LSIO_NON_ROOT_USER is unset, and init-emby-config skips creating /data (read-only or non-root) and the /config ownership fix-up (non-root). readme-vars.yml gets readonly_supported / nonroot_supported and a changelog entry.

Benefits of this PR and context:

Today the image can't run with --user: svc-emby always calls s6-setuidgid abc, which fails as non-root (unable to set supplementary group list), and the ownership check in init-emby-config tries a recursive lsiown because PUID defaults to 911. With this change emby can run read-only and as a non-root user with no added capabilities, like plex and the arr images. Root mode is unchanged.

How Has This Been Tested?

Built from this branch (Dockerfile unchanged, EMBY_RELEASE=4.10.2.0) and run against an existing 3.2 GB /config from a production server, on rootless Podman 5.8.2 on AlmaLinux 9 with an AMD GPU:

podman run -d --userns keep-id --cap-drop ALL --security-opt no-new-privileges --read-only \
  --tmpfs /run:U,exec,mode=0755,size=16m --tmpfs /tmp:U,size=256m --tmpfs /transcode:U,size=56G,mode=1777 \
  --device /dev/dri -v ./config:/config -v <media>:/data/...:ro <image>
  • Init completes with the read-only/non-root notice, all processes run as the mapped user with no capabilities, and the server comes up with the same server ID, libraries and settings.
  • VAAPI detection finds the same codecs (h264, hevc, mpeg2, vc1, vp9) as the current image running as root.
  • Nothing is written outside /config, /run, /tmp and /transcode.
  • It is now running as the production server against that same existing /config.

Not tested with Docker or on aarch64. The Dockerfiles are unchanged.

Source / References:

docker-plex svc-plex and init-plex-chown use the same LSIO_NON_ROOT_USER / LSIO_READ_ONLY_FS guards.

@github-actions

Copy link
Copy Markdown

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI

Copy link
Copy Markdown
Collaborator

This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@tkimball83

Copy link
Copy Markdown
Author

Still active and ready for review. It's been running as my production Emby server since it was opened, with no issues.

The failing permission_check isn't related to this change. It stops at the checkout step, before it looks at any files: actions/checkout@v7.0.1 refuses to check out fork PR code from a pull_request_target workflow unless allow-unsafe-pr-checkout is set (run log). Other fork PRs here fail the same way. Both run scripts in this PR are committed as 100755.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants