User Tools

Site Tools


wiki:change_privileged_unprivileged_container

Change privileged to unprivileged container in Proxmox

In Proxmox add this to /etc/pve/lxc/container_number.conf (mount.entry was added for openvpn)

unprivileged: 1
lxc.mount.entry: /dev/net dev/net none bind,create=dir
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536

Install

apt install python3-pylibacl

Run script

Python3 script

Make sure the 2nd argument is correct, which is offset from current values in lxc rootfs i.e. if the owner is 200000 executing the script below will set owner to 300000:

  ./change_perms.py /rpool/data/subvol-103-disk-1/ 100000

Adapt /etc/pve/lxc/container_number.conf and /etc/subuid and /etc/subgid accordingly.

Tested on

See also

References

wiki/change_privileged_unprivileged_container.txt · Last modified: 2021/04/01 14:38 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki