To give a specific group access to a USB device you have to add a rule to udev
in /etc/udev/rules.d/
. I added a file called 50-MyDevice.rules
that contains this line:
SUBSYSTEM=="usb",ATTRS=="abcd",ATTRS=="1234",MODE="0660",GROUP="mygroup",SYMLINK+="mydevice%n"
Where I have replaced the values after idVendor and idProduct with the USB device's VID and PID. Pay special attention to the number of equal signs after each parameter!
After this I rebooted linux.
Now, every time I plug in the USB device (or if I plug in several of the same device) I get a symlink called /dev/mydevice1
or /dev/mydevice2
. This is a symlink pointing to /dev/bus/usb/001/001
(or in the second case /dev/bus/usb/001/002
). The targets of these symlinks have the the proper mode and group permissions defined in the rules file.