Pass USB dongle to unprivileged LXC container

rty

Member
Feb 3, 2023
11
2
8
I got a USB dongle at /dev/ttyUSB0 which I want to use in a Proxmox LXC Container. Device is available in the container, but the ownership troubles me. I found several potential solutions but not any has worked for me.

Inspired by this thread I executed pct set 246 --dev0 /dev/ttyUSB0,uid=2046,gid=2046
(the option mode=666 was refused although the manpage mentioned it) on my Proxmox 8.3 host. Alas, in the container, I still get

crw-rw---- 1 nobody nogroup 188, 0 Feb 23 15:03 /dev/ttyUSB0

Another attempt involved an udev rule with SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4" , ATTRS{idProduct}=="ea60", KERNEL=="ttyUSB0", OWNER="2024", GROUP="2024", MODE="0660" in the container's /etc/udev/rules.d/99-usb-serial.rules but again, after rebooting the container, the device still belongs to "nobody".

How can I get this done?