ipaqmaster / vfio

A script for easy pci and usb passthrough along with disks, iso's and other useful flags for quick tinkering with less of a headache. I use it for VM gaming and other PCI/LiveCD/PXE/VM/RawImage testing given the script's accessibility.
GNU General Public License v3.0
189 stars 11 forks source link

-usb 'xxx' doesn't passthrough if usb device path in /dev/bus/usb/ not owned by user running the script. #11

Closed ipaqmaster closed 2 years ago

ipaqmaster commented 2 years ago

I've introduced a regression in latent versions likely since the underprivileged sudo update which prevents USB devices from being passed through in some scenarios.

This related to ownership of /dev/bus/usb as manually setting ownership of this to the underprivileged user account of choice before using the script reveals a passed usb device in lsusb output, but not otherwise.

This is more of a "note to self" so I can add extra calls to the permissionsManager function to handle this so it's not a pain.

lsusb output shows the bus path and device path per-line for devices so it'll be pretty easy to capture and implement for running as non-root and managing permissions with sudo.

ipaqmaster commented 2 years ago

This was consistent on another PC at home. It only happened for USB storage devices such as flash memory usb sticks. Passing through peripherals continued to be fine as non-root.

Fixed in commit 4cb86fbbae86592a92f80a5eb29a2f541b2c8324