-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
squeezeboxserver user in docker image is not added to group $PGID #16
Comments
I am sorry to bump this, but could anyone implement the fixes that @doctorjames suggests? They seem to be insightful. |
I wish I read this bugreport prior to wasting 90 minutes on debugging the FS access denial. %) |
Yes, would be great if somebody could come up with a pull request. Thanks! |
|
I think I run into the same error. LMS starts, but looking under settings and click on 'Media Folders' - browse. Only the folders inside the container itself are seen. I use the following docker run parameters in the Task Scheduler: |
The very simple solution was to create a new user account(1034) on the nas and give this user Read rights on the Music folder on the Nas and read/write rights on the docker config folder on the nas. Then use the UID(PUID) of that user. And use the GID(PGID) of the normal user group=100. docker run -d |
The squeezeboxserver user is set up as part of the Dockerfile build process.
The line
usermod -g $PGID squeezeboxserver
has therefore already been executed when building the image, not with the user specified PGID at runtime.If the user overrides the group using the PGID environment variable, this is used to chown various files in start-container.sh but the squeezeboxserver user is not added to this group. This prevents using the PGID to allow access to music files mounted from the host.
I would expect changing:
to:
in
start-container.sh
would make it work, however using a differently named group to "nogroup" would be semantically better since it is a group, and in my use case, one that serves an access role.It might be cleanest to specify an (optional) group for the read/write files (i.e. what is affected at present) and a separate group that the squeezeboxserver user is put in by start-container.sh intended for access to the read only music.
The text was updated successfully, but these errors were encountered: