Alpine LXC USB passthrough no user assigned
I want to use an alpine-LXC on my Proxmox-Homeserver to serve CUPS in my Home-Nework. Alpine runs as an unprivileged LXC, the Printer is attached via USB. Proxmox is configured as follows:
root@pve:~# lsusb
Bus 001 Device 007: ID 03f0:142a HP, Inc HP LaserJet 400 MFP M425dn
root@pve:~# exa -lgTh /dev/bus/
Permissions Size User Group Date Modified Name
drwxr-xr-x - root root 9 Dec 2022 /dev/bus
drwxr-xr-x - root root 9 Dec 2022 └── usb
drwxr-xr-x - root root 4 Jan 13:43 ├── 001
crw-rw-r-- 189,6 root lp 4 Jan 13:43 │ └── 007
root@pve:~# tail -n 4 /etc/pve/lxc/105.conf
unprivileged: 1
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb dev/bus/usb none bind,optional,create=dir
lxc.mount.entry: /dev/usb/lp0 dev/usb/lp0 none bind,optional,create=file
For the Alpine-LXC config, i have more or less followed the wiki https://wiki.alpinelinux.org/wiki/Printer_Setup.
When entering the Container, the Printer is visible but doesn't have the right ownership.
~ # lsusb
Bus 001 Device 007: ID 03f0:142a Hewlett-Packard HP LaserJet 400 MFP M425dn
~ # exa -lgTh /dev/bus/
Permissions Size User Group Date Modified Name
drwxr-xr-x - root root 4 Jan 15:18 /dev/bus
drwxr-xr-x - nobody nobody 9 Dec 2022 └── usb
drwxr-xr-x - nobody nobody 4 Jan 12:43 ├── 001
crw-rw-r-- 189,6 nobody nobody 4 Jan 12:43 │ └── 007
~ # exa -lgTh /dev/usb/
Permissions Size User Group Date Modified Name
drwxr-xr-x - root root 4 Jan 15:18 /dev/usb
crw-rw---- 180,0 nobody nobody 4 Jan 12:43 └── lp0
As you can see, the mounted devices are owned by nobody, thus unreachable for CUPS. As in the wiki, I have added the following lines to /etc/mdev.conf:
~ # grep 'root:lp' /etc/mdev.conf
SUBSYSTEM=usb;PRODUCT=3f0/142a/100;.* root:lp 660 */lib/mdev/usbdev
which didn't change the ownership issue.
Can anyone more familiar with Containers and/or mdev help me?