Repository navigation
build(transmission): create the transmission user explicitly - #76
Merged
Merged
Conversation
The Alpine transmission package creates the 'transmission' user and group in
transmission-daemon.pre-install, but that script redirects the output of both
addgroup and adduser to /dev/null and always exits 0. The package therefore
installs 'successfully' even when the user was never created, and the image
then fails with
chown: unknown user transmission.
The image cannot work without that user either: the entrypoint starts the
daemon with 'su -l transmission'.
The user and the group are now created explicitly, and the home directory is
still moved to /var/lib/transmission-daemon and set with usermod, so the image
no longer depends on the package's pre-install side effect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
transmissionimage does not build, and it could not work if it did:The Alpine
transmissionpackage creates thetransmissionuser and group intransmission-daemon.pre-install, but that script redirects the output of bothaddgroupandadduserto/dev/nulland always exits 0. The package thereforeinstalls "successfully" even when the user was never created, and the image then
fails on
chown -Rh transmission. $dir.The user is not optional: the entrypoint starts the daemon with
su -l transmission -s /bin/bash -c "exec transmission-daemon ...".The user and the group are now created explicitly in the image, so it no longer
depends on a package side effect that fails silently. The home directory is still
moved to
/var/lib/transmission-daemonand set withusermod, so the layout thedaemon expects is unchanged.