Hello guys !
I’m a developper, in charge of our dedicated server (and enjoying it), but i’m encountering my limits on LXC/D containers…
I’ve read many tutorials and explainations about the theory and i’m stay stucked with my problem.
Context
Dedicated Ubuntu 16.04 LTS, with LibLxcl version 2.0.8.
Problem
I’m trying to create a shared folder between the Host and the container. The mounted folder works well, but the resulting directory (and subs, and files) inside the container are owned by
“nobody:nogroup” (65534:65534).
My host subuid/subgid:
lxd:100000:65536
root:100000:65536
My user profile:
name: root config: raw.lxc: | lxc.id_map = lxc.id_map = u 0 100000 65536 lxc.id_map = g 0 100000 65536 user.vendor-data: | users: - name: root groups: sudo shell: /bin/bash sudo: ALL=(ALL) NOPASSWD:ALL packages: - bash
My container config:
architecture: x86_64 config: boot.autostart: "1" volatile.base_image: 069b95ed3a60645ee1905b7625a468d1357f00bd61bf096fc597063c6ed42cf1 volatile.eth0.hwaddr: 00:16:3e:c3:25:c7 volatile.idmap.base: "0" volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgi$ volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false$ volatile.last_state.power: RUNNING devices: root: path: / type: disk project_ssl_stats: path: /SSL/stats.project source: /var/SSL_certificates/stats.project type: disk project_ssl_sync: path: /SSL/sync.project source: /var/SSL_certificates/sync.project type: disk ephemeral: false profiles: - root stateful: false description: ""
The shared directories in host are owned by root.
I know that my understanding of linux’s users mechanisms are limited, but i don’t understand why this config-set doesn’t works, because that looks like all samples i’ve aready seen on many sources.
Oh and simple/optional/curiosity question :
why the user config file need an empty “lxc.id_map =” ?
Can someone help me ?