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!

  • Revv
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 months ago

    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.

    • Scrubbles@poptalk.scrubbles.tech
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      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_addict@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        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.