Hi, I need help to understand what I am doing wrong with my setup.

I am running a proxmox node (pve) where I have mounted my nfs storage (containing backups from my old server) on the host and assigning them to containers using pct set command.

On Host:I am setting the user permissions to the mounted folder so that the user from lxc can rw to it and the sub-folders(or atleast I thought it would be possible).

On Unpreviledged LXC:The mount is recognized and is accessible with the correct user permissions to rw

The docker container created inside the lxc is unable to read/write to this storage even though they are assigned to the correct user id 1000. The docker setup is logging errors and won’t start up.

Appreciate the help!

  • RevvEnglish
    arrow-up
    2
    arrow-down
    0
    ·
    3 months ago
    link
    fedilink

    I’m not a docker expert- i tend to just run everything in an LXC. But, doesn’t docker typically run as root? It might be that you gave your lxc user UID proper permissions, but not the lxc root UID.

    Alternatively, you are aware that LXC UID 1000 != Host UID 1000, yes?

    FWIW, permissions in proxmox/LXC are really clear and predictable once you understand the way the map in the config files.

    • ScrubblesEnglish
      arrow-up
      1
      arrow-down
      0
      ·
      3 months ago
      link
      fedilink

      the default is root, but most containers will specify a UID/GID to run under. That makes it even harder with docker on lxc on proxmox.

      • ama_coffee_addictOPEnglish
        arrow-up
        1
        arrow-down
        0
        ·
        3 months ago
        link
        fedilink

        This is the case with bookstack image. I specify the uid and gid as environment variables and it is expected that the ids remain compatible with the lxc and the host. But I am having trouble writing to the mount even from the lxc with the uid 1000 which is mapped to 101000 on the host.