wiki:change_privileged_unprivileged_container
Table of Contents
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
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
- http://tbrink.science/blog/2017/06/20/converting-privileged-lxc-containers-to-unprivileged-containers/ (NOTE:id_map is deprecated)
wiki/change_privileged_unprivileged_container.txt · Last modified: 2021/04/01 14:38 by antisa