![USBtiny error](https://i0.wp.com/mithatkonar.com/blog/wp-content/uploads/2018/02/usbtiny-error.png?resize=523%2C216)
I was able to clear a “Warning: cannot open USB device: Permission denied” error when using a USBtiny programmer on my Debian sid system by adding the suggestion at the end of this Adafruit page.
Specifically, as root create a file /etc/udev/rules.d/99-USBtiny.rules
with the following single line:
SUBSYSTEM=="usb", ATTR{product}=="USBtiny", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout"
The next time you log in, your USBtiny should work as expected.
You can confirm the ATTR{idProduct}
and ATTRS{idVendor}
values by plugging in your USBtiny and running dmesg (as root):
# dmesg [404467.789928] usb 2-1.2: New USB device found, idVendor=1781, idProduct=0c9f [404467.789930] usb 2-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0 [404467.789931] usb 2-1.2: Product: USBtiny
Update (9/17/2018)
I received a new programmer that was identifying itself as “USBtinyISP” rather than “USBtiny”, and so the udev rule above wasn’t allowing user access to the new programmer. The solution was to add a new rule in the form of a second line to /etc/udev/rules.d/99-USBtiny.rules
:
SUBSYSTEM=="usb", ATTR{product}=="USBtiny", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout" SUBSYSTEM=="usb", ATTR{product}=="USBtinyISP", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout"Copyright © 2018 Mithat Konar. All rights reserved.