Docker containers and permissions in LE

  • I have some containers working in Docker on LE. I set them with PGID and PUID as 1000 and they work ok but then there are some other containers that I've tried to run with the same permissions and I get: "Permission denied" error. Why is that?


    Ok, I can see that the USB HDD that the problematic containers are located on had root/root permissions but I can't change it to 755 with 'chmod 755 /var/media/CE' How do I change it?

    Edited 2 times, last by makakam (January 24, 2023 at 3:09 PM).

  • To avoid problems I recommend using

    -e PUID=0

    -e PGID=0

    either

    --user 0:0

    in the creation of the containers whose storage space can interact with the storage space of LibreELEC.

    If you need to change permissions on any storage space, do it with LibreELEC SSH because it uses root user.

  • I don't recommend running docker container apps as root. Some flat out don't work (anything with php for instance). It also creates a security liability especially for ones with exposed guis.

    Linuxserver docker addons run as nobody:users (65534:100). If you're mounting an external drive (or a remote share), make sure to mount it as user 65534:100 and chown as needed and it will be fine. Libreelec runs as root so it will be able to access it anyway.