privileged versus unprivileged LXC

stappers

New Member
Feb 17, 2018
20
0
1
61
Hi,

Where to see if a linux container is privileged or not?

Rephrased: How to check if a CT is unprivileged?


At https..//pve.proxmox.com/wiki/Unprivileged_LXC_containers is only stated
it must be set during create. Nothing the check the result.

I did create through rest API
and can't see the difference between one with unprivileged parameter (default 0 ) and one with parameter unprivileged 1

Cheers
Geert Stappers
 
Hi,

you can check it in the lxc.config it is located

/var/lib/lxc/<VMID>/config

If it is an unprivileged container you see this 2 lines.

Code:
lxc.idmap = u 0 100000 65536
lxc.idmap = g 0 100000 65536
 
Hello,

is it safe to use in Proxmox 6 privileged LXC containers in a production environment? Because if I use unprivileged LXC container, I cannot install control panels such as, for example Plesk, cPanel and similar.

Regards,
 
Hello,

is it safe to use in Proxmox 6 privileged LXC containers in a production environment?

running a privileged container basically means that the 'root' user in the container is the 'root' user of the host, so if someone were to compromise your container and break out of it, they would have root access on your host.

Because if I use unprivileged LXC container, I cannot install control panels such as, for example Plesk, cPanel and similar.

usually you can get away with enabling the 'nesting' option on an unprivileged container (can be found in GUI, under 'Options -> Features') to run stuff like that
 
Hello,

thanks for answer. Do you maybe know what feature should I enable? Maybe keyctl?

Regards,
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!