UDEV, USB and permissions

Hi peeps,

I’ve been stumbling on this so many times, so I decided to dedicate this post to the following issue:
If you connect an USB device to your computer, trying to access it under Linux, you might run into permission issues caused by the UDEV daemon.

In my case, I was trying to connect an Android smartphone in order to work with it.
However, somehow, I had no permissions to access it, due to UDEV.

Here’s how to fix such a problem:

  1. Determine the vendor-id and the product-id of your device using lsusb:

    Bus 002 Device 009: ID 0bb4:0c97 High Tech Computer Corp. 
    Bus 002 Device 004: ID 04b3:310c IBM Corp. Wheel Mouse
    Bus 002 Device 003: ID 046d:c318 Logitech, Inc. Illuminated Keyboard
    Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    
  2. Create a new udev rule for this device, i.e., create a file /etc/udev/rules.d/51-mydevice (for instance), with the following contents:

    SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct} =="41db", 2 MODE="0666", OWNER="%username%"
    

Posted

in

by

Tags: