[systemd-devel] How to grant systemd-nspawn access to USB device?
Kevin P
petrilli.kevin at gmail.com
Wed Mar 9 14:04:00 UTC 2022
Good evening everyone.
I would like a nspawn container on my Raspberry Pi (Raspbian, systemd 247)
to access a RTL2838 DVB-T USB stick.
Inside the container, dump1090 will run and feed aircraft data (piaware and
adsbexchange projects).
lsusb gives:
Bus 001 Device 005: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
file /dev/bus/usb/001/005 returns:
/dev/bus/usb/001/005: character special (189/4)
And finally grep 189 /proc/devices shows:
189 usb_device
I edited both the .nspawn file and the .service file, of which I'm
reporting the relevant parts below.
/etc/systemd/nspawn/ads-b.nspawn
[Files]
Bind=/dev/bus/usb/001/005
systemd-nspawn at ads-b.service
[Service]
DeviceAllow=/dev/bus/usb/001/005 rwm
DeviceAllow=usb_device rwm
However I feel like I am doing something wrong, as starting dump1090 from
within the container returns permission denied.
I'll gladly take any advice :)
Kevin P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220309/7c982d40/attachment.htm>
More information about the systemd-devel
mailing list