My USBAsp dongle arrived from China. It’s connected to the ISCP pins on an Arduino Nano, and also plugged to a computer via USB connection.

According to lots of intructions on the Internet, to upload a sketch to an Arduino, we need to do the following steps:
- Tools -> Programmer -> USBasp
- File -> Upload Using Programmer
Unfortunatly, it did not work for me. Here is the error message produced by Arduino IDE:
avrdude: Warning: cannot query manufacturer for device: error sending control message: Operation not permitted
avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc
I found out later that, to fix this, we need to add a udev rule to allow a normal user accessing the USBasp dongle.
Let’s create a file, /etc/udev/rules.d/99-USBasp.rules with the following content:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="plugdev", MODE="0666"
Next, ensure that your account is in the group plugdev. Finally, unplug the USBasp dongle, then reconnect it and try to upload the sketch again.
It worked for me, and hoefully it’d work for you too.
Source: