[SOLVED] bind mount and unprivileged LXC

plato79

Member
Nov 24, 2020
25
11
23
46
Ok, I know this subject is talked about too much but while I did it successfully, that's not what I need..

my current config is as follows:
Rich (BB code):
100.conf:
.
.
.
lxc.idmap: u 0 100000 1000
lxc.idmap: g 0 100000 1000
lxc.idmap: u 1000 1000 1
lxc.idmap: g 1000 1000 1
lxc.idmap: u 1001 101001 64535
lxc.idmap: g 1001 101001 64535

/etc/subuid:
root:1000:1

/etc/subgid:
root:1000:1

I have two raidz2 storage which are under media:media user with uid 1000

Before modifying this configuration I could access files but owner was nobody:nogroup..

Now it shows as 1000:1000 or if I add user media with uid 1000 to LXC, it shows media:media under LXC too...

Everything looks ok, although there is a problem. I don't want to use my LXC with root user but with media user.

Although if I login with media user, it says home folder is now shows as nobody:nogroup and I cannot change anything.

So, is there some way to login with media user, or do I have to use root user?
 
Just found out, when I execute adduser it creates the media user's home folder with uid 101000..
Modifying it on the host solved the problem..

I can now access my media user and work with it.