LXC restore issue and security question

MasterTH

Renowned Member
Jun 12, 2009
224
7
83
www.sonog.de
Hi,

i just tried to restore an openvz backup to a lxc on zfs-storage in unprivileged mode. i got this error:

Code:
 pct restore 101 vzdump-openvz-101-2016_02_21-23_15_57.tar --unprivileged --storage ZFS-Local
extracting archive '/root/vzdump-openvz-101-2016_02_21-23_15_57.tar'
tar: /root/vzdump-openvz-101-2016_02_21-23_15_57.tar: Cannot open: Permission denied
tar: Error is not recoverable: exiting now
command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- tar xpf /root/vzdump-openvz-101-2016_02_21-23_15_57.tar --totals --sparse --numeric-owner --acls --xattrs '--xattrs-include=user.*' '--xattrs-include=security.capability' '--warning=no-xattr-write' -C /var/lib/lxc/101/rootfs --skip-old-files --anchored --exclude './dev/*'' failed: exit code 2


then i decided to test if the container will work in privileged mode. But then i saw that i can read the debug messages from the host itself.... and also the "htop" values are from the host.

how can this be fixed?


kind regards
 
The archive will be extracted as the unprivileged user, so it has to be somewhere the unprivileged user can read it. /root usually has permissions 0700, so users cannot enter that directory.
Move the vzdump archive to some other place which unprivileged users have read access to.
 

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!