<div dir="ltr">>  If you want the container to have access to your host uid 1000's files, then add a second mapping,<div><br><div class="gmail_extra">Yup. this is what I eventually figured out. Is there a way to get lxc-execute to not exec the passed in executable as uid 0? This is all just a total proof of concept, but I was aiming to:<div><br></div><div>* Map some low privileged user with outside uid (1000) to inside uid (1000)</div><div>* Leave all other uids unmapped</div><div>* Have the passed in executable execute as uid 1000 inside the container</div><div><br></div><div>Here is my current config:</div><div><br></div><div>  cat default.conf</div><div>    lxc.id_map = u 1000 1000 1</div><div>    lxc.id_map = u 0 100000 1</div><div>    lxc.id_map = g 1000 1000 1</div><div>    lxc.id_map = g 0 100000 1</div><div><br></div><div>I was forced to map inside uid 0 or I get the following error when I run lxc-execute:</div><div>  lxc-execute: cgmanager.c: chown_cgroup_wrapper: 424 Invalid argument - Failed to setgid to 0</div><div>  lxc-execute: cgmanager.c: chown_cgroup_wrapper: 426 Invalid argument - Failed to setuid to 0</div><div><br></div><div>So, with the above config I do successfully launch bash, but it seems as though lxc.init always does that as uid 0:</div><div><br></div><div><div>  lxc-execute -n blah99 -f test.conf --lxcpath=/home/my_user/containers -- bash</div><div>  lxc: cgmanager.c: lxc_cgmanager_escape: 329 call to cgmanager_move_pid_abs_sync(name=systemd) failed: Escape request from different namespace requires a proxy</div><div>  bash: /root/.bashrc: Permission denied</div></div><div>  root@myhost:/home/my_user#<br></div><div><br></div><div>So, uid 0 is mapped to outside uid 100000 and uid 1000 is mapped to inside uid 1000, but I'd like to have bash itself launch as uid 1000. But, it seems like lxc-execute currently forces a switch to uid 0 in the container. I'm guessing executing the spawned process as the original parent uid is not possible? In theory I could just map inside uid 0 to outside uid 1000 get the effective permissions I'd be looking for. But, you get weird side effects like the "bash: /root/.bashrc: Permission denied" since bash will believe that /root is the user's home directory. </div><div><br></div><div>As an aside, no matter what I do I always get:</div><div>  "lxc: cgmanager.c: lxc_cgmanager_escape: 329 call to cgmanager_move_pid_abs_sync(name=systemd) failed: Escape request from different namespace requires a proxy" error."</div><div><br></div><div>The above error doesn't seem to affect the ability to spawn the child process/container, but I was not sure what was causing it and/or what side effects may occur because of it. </div><div><br></div></div></div></div>