avrdude is a simple tool that allows downloading of a program to a target microcontroller. For completeness, the command I am trying to issue is:
avrdude -p atmega328p -c usbtiny -P usb -v -U -flash:w:program.hex
Every time I issue this command I am subjected the error
'Operation not permitted" and am required to
sudo avrdude .. in order to get it to work. I found it strange it was necessary to do this, so I dove into the problem a bit more.
The programmer I am using mounts itself at
/dev/ttyUSB0 and is part of the
dialout group. Further, this device has permissions such that any user in the
dialout group shall be able to write to the device, which is what the command above does.
crw-rw---- 1 root dialout 188, 0 Jul 15 02:04 ttyUSB0
rootowning the device, simply adding myself to the dialout group seemed to be sufficient to allow myself to use the device. After doing this, I still was met with the error
"Operation not permitted".
I thought, then, that perhaps the
avrdude program itself was the problem. After finding the binary in
/usr/bin it was clear that this was not an issue given the permissions of the file.
-rwxr-xr-x 1 root root 413888 Oct 21 2013 avrdude
tl;dr I am part of the appropriate group and the files have permissions that should allow me to use them, yet I am still unable to without first elevating myself.