Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Apr 2021
    Posts
    2

    Problems with LMS in Docker and Library Permissions [Solved]

    Hello. I am having problems with permissions on my LMS setup inside a docker container. I know enough to figure out that it is because of permissions but not enough to figure out how to fix it.

    The setup that I have is LMS running in a docker container on a Raspberry Pi. The Raspberry Pi has an automatic mount of a Samba share from a hard drive attached to my router that is set up in fstab and works well on the Pi. I can access and open all shared files including the music directory and all the albums in it. The location on the Pi is /home/pi/ddwrt/ for the samba share.

    The docker container for LMS has a volume mount from the music folder on the samba share to the /music folder inside the container (/home/pi/ddwrt/Music:/music). When I exec into the container (using the console feature in Portainer because its easier) as root user, I can access the /music folder. However if I exec into the container as the squeezeboxserver user, permission is denied to the /music folder.

    When I run a music scan from LMS via the settings, I get an error. The line from the log is:
    Code:
    Slim::Utils::Scanner::Local::Async::__ANON__ (70) Error scanning file or folder: /music: Permission denied
    I've tried adding the squeezeboxserver user to the root group with
    Code:
    usermod -g root squeezeboxserver
    but this didnt fix the issue.

    One workaround that I found was to edit the /etc/passwd file and to change the squeezeboxserver user line to:
    Code:
    squeezeboxserver:x:0:0::/home:
    but I dont think this is a good idea because I get warnings in the log telling me that Logitec Media Server should not be run as root and to try using squeezeboxserver user instead. Will or could this cause any issues? I dont want to run it this way becasue of the warning and I am worried that I might cause other problems.

    Thanks in advance for the assistance.
    Last edited by farizno; 2021-04-19 at 11:51. Reason: Solved

  2. #2
    Senior Member
    Join Date
    Mar 2011
    Posts
    177
    ssh into your raspi and issue a cat /etc/passwd

    this list a file where users are in. pick the PUID (4 digit) and the PGID (3 digit) of a user which has access to the music share
    enter those values into the docker config environment vars "PGID=xxx" and "PUID="xxxx".

    Then the dockrer container runs with the needed user and group settings to get access to the share.

  3. #3
    Junior Member
    Join Date
    Apr 2021
    Posts
    2
    Thank you so much mamema! This was exactly what I needed and now it works flawlessly. I was messing around changing the permissions for the user inside the container and it was driving crazy.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •