Why does PyUSB / libusb require root (sudo) permissions on Linux?

后端 未结 3 1791
北荒
北荒 2020-12-31 12:25

I have been toying around with PyUSB lately, and found that it works beautifully on Linux (Ubuntu has libusb 0.1 and 1.0, as well as OpenUSB)... but only if I run the progra

3条回答
  •  长情又很酷
    2020-12-31 12:45

    libusb allows you to manipulate arbitrary USB devices in arbitrary ways. You could format an external USB harddisk, for example.

    In general, all direct hardware access requires root privileges, although I guess that actually full root privileges are not required, you should be fine with just CAP_SYS_RAWIO.

提交回复
热议问题