I've previously created eight lxc containers with user mapping and two bind mounts.  Today I created another container using the same method as the others and I'm having an issue with a user's home directory after applying the user mapping.  Here are the steps I use to create the container:
On LXC container:
	
		
	
		
On PVE host:
	
		
	
		
Now when I start the container the home directory of media changes permissions to this:
	
	
	
		
				
			On LXC container:
I run the following commands:
	
	
		Code:
	
	useradd -u 1105 media
groupmod -g 1105 media
mkhomedir_helper mediaThe user media will be mapped to a media user on the PVE host.  I check the permissions of the created home directory and it looks fine:
	
	
		Code:
	
	drwxr-xr-x  4 media media 4.0K Apr 18 00:36 media
I shutdown the container and edit the PVE host.On PVE host:
Edit the subuid and subgid:
	
	
		Code:
	
	root:1105:1
root:100000:65536Add these lines to the LXC .conf file:
	
	
		Code:
	
	mp0: /mnt/bindmounts/shared/Downloads,mp=/mnt/Downloads
mp1: /mnt/bindmounts/drobo/Media,mp=/mnt/Media
lxc.idmap: u 0 100000 1105
lxc.idmap: g 0 100000 1105
lxc.idmap: u 1105 1105 1
lxc.idmap: g 1105 1105 1
lxc.idmap: u 1106 101106 64430
lxc.idmap: g 1106 101106 64430Now when I start the container the home directory of media changes permissions to this:
		Code:
	
	drwxr-xr-x  4 nobody nogroup 4.0K Apr 17 23:28 media
I can't chown or modify these permissions with root.  The only way to revert is to remove the user mapping.  Can someone explain why this hasn't happened on my other containers using the same steps?  Thanks in advance. 
	 
	 
 
		 . You can change the owner/group to the mapped user's (you are running the command on the host, so there is no permission issue) and then use
. You can change the owner/group to the mapped user's (you are running the command on the host, so there is no permission issue) and then use