Goal
I’m trying to get a usb device (PicoTech PicoScope 2204A) to work inside a container.
What works
On my personal PC, running Arch Linux, this works without issue:
sudo incus config device add informed-cardinal pico unix-hotplug vendorid=0ce9 productid=1007 mode=0666
# Now I have to physically re-plug the device in order for the /dev/bus node to show, but that's ok for now.
sudo incus shell informed-cardinal
$ dd if=/dev/bus/usb/008/032 bs=1 count=1 # inside container
1+0 records in
1+0 records out
1 byte copied, 2.4716e-05 s, 40.5 kB/s
The container has no further configuration. It is unprivileged.
The problem
But, when I do the same on my (pretty vanilla) Debian 13 machine, I get: dd: failed to open '/dev/bus/usb/002/016': Permission denied.
What I tried
I tried to add this raw lxc option, which is mentioned here and there on the web:
incus config set sound-katydid raw.lxc="lxc.cgroup2.devices.allow = c 189:* rwm"
The only observation is that, with that option in place, I get this error upon opening the container shell: -bash: /dev/null: Operation not permitted. Presumably the option overrides/messes up some important implicit lxc configuration.
Another thing I tried was to set lxc.apparmor.profile=unconfined, I don’t see any difference.
I also tried to make the container privileged, but this didn’t help either.
On the Debian host, the dd command does succeed.
Question
What is the difference between the Arch and Debian systems, that leads to a permission error on Debian? What do I change to get this to work?
Thanks!