LXC permission issues, apt fails

toma3757

New Member
Jan 23, 2020
4
1
1
28
Hi!

I have the following configuration -- on the host:
On the host I have a user caller mediastorage with 110:117 (uid:gid) "who" owns /mnt/mediastorage.
Bash:
root@proxmox:~# cat /etc/subuid
root:100000:65536
root:110:1
root@proxmox:~# cat /etc/subgid
root:100000:65536
root:117:1

Bash:
root@proxmox:~# cat /etc/pve/lxc/102.conf
arch: amd64
cores: 4
hostname: plex
memory: 1024
mp0: /mnt/mediastorage,mp=/mediastorage
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.1.2,hwaddr=,ip=192.168.1.13/24,type=veth
ostype: debian
rootfs: local-lvm:vm-102-disk-0,size=8G
swap: 0
unprivileged: 1
lxc.idmap: u 0 100000 107
lxc.idmap: u 107 110 1
lxc.idmap: u 108 100108 64530
lxc.idmap: g 0 100000 115
lxc.idmap: g 115 117 1
lxc.idmap: g 116 100116 64530

The container is newly installed from the default debian 10.0 template, only added a user with 107:115 (uid:gid).
I would like to run apt update but i got the following errors:

Bash:
root@plex:~# apt update
E: setgroups 65534 failed - setgroups (22: Invalid argument)
E: setegid 65534 failed - setegid (22: Invalid argument)
Reading package lists... Done
E: setgroups 65534 failed - setgroups (22: Invalid argument)
E: setegid 65534 failed - setegid (22: Invalid argument)
E: Method gave invalid 400 URI Failure message: Failed to setgroups - setgroups (22: Invalid argument)
E: Method gave invalid 400 URI Failure message: Failed to setgroups - setgroups (22: Invalid argument)
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (112)
Bash:
root@proxmox:~# pveversion
pve-manager/6.1-5/9bf06119 (running kernel: 5.3.13-2-pve
How can I solve this issue? Why it fails? Can somebody help me please?
Thanks!
 
Last edited:
Hi,
inside the container the group ID for the user _apt probably is 65534 (you can check in /etc/passwd). Try mapping this as well
Code:
lxc.idmap = g 65534 165534 1
and see if it works.
 
  • Like
Reactions: 0nikola1 and thex

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!