Restoring a unprivileged container with custom idmap results in nouser/nobody folders


Well-Known Member
Jul 11, 2018
I created a unprivileged container and created a user with ID 1003 (user1) in it. I wanted to map that user to a user with ID 200001 (user1) from the Host system, so I can attach a external hard drive and map it inside the container and administrate it from the Host with a meaningful user name.

I'm using this IDMAP configuration:

lxc.idmap: u 0 100000 1003
lxc.idmap: g 0 100000 1004
lxc.idmap: u 1003 20001 1
lxc.idmap: g 1004 20001 1
lxc.idmap: u 1004 101004 64532
lxc.idmap: g 1005 101005 64531

As I created the user in the container before I added the idmap mapping to the container, the home folder of the user1 is shown as if it belongs to the user nobody/nogroup, but chowning it manually to user1 fixed the issue, and this container has been running without any issues for several months now.

After some time I did a backup of the container, and at some point later I needed to restore the backup to rollback to a previous state, but everything that was from user1 is again from nobody/nogrup, why?

The backup has been created after the idmaps have been setup and all folders had the proper user permissions assigned, yet everything that belonged to user1 is now from nobody. Also the idmaps where in the backup included and properly restored. Interestingly all files from the externally mounted drive have all the proper permissions and are shown as the correct user1 in the container. It seems like the backup process doesn't takes into account the new mappings. So it must be an issue on how the folder permissions are saved or restored from the backup.

Any idea how to make this work properly or what's causing the issue?


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!