Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Ubuntu 12.04 for programming purposes and recently decided to bring my previous atmel's micro-controller projects from Win to Linux. Namely AVR.

I installed the tool chain all right. It includes: avrdude binutils-avr gcc-avr avr-libc gdb-avr.

To test my connection to the micro-controller I used an olimex avr-usb-jtag programmer. When I plug it in and it is seen as /dev/ttyUSB0 (being an FTDI usb-com chip). The programmer is Atmel JTAGICE compatible.

Now when we try to

avrdude -p c128 -c jtag1 -P /dev/ttyUSB0 -t

And we get

avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied

So far it seems that without root's permissions we can't write nor read from the device. And it proves to be true when we actually try

sudo avrdude -p c128 -c jtag1 -P /dev/ttyUSB0 -t

The response is:

avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9781

Now I want to enable usual users (like programming IDE's for example) to access the programmer without giving them root permissions. The FIRST QUESTION for me is how to do that better?

I tried the udev approach and wanted the system to distinguish the plugged in device and apply permissions to the device file (ttyUSB0 by default for me). But the only option that worked was making a new file:


It contained

KERNEL=="ttyUSB*" MODE="0666"

This configuration works, but I'm curious why something like this below doesn't work for me at all (the default ttyUSB0 is appearing, no rules are applied to the file)?:

SUBSYSTEM=="usb", ATTR{idProduct}=="6001", ATTR{idVendor}=="0403", MODE="0666"

Any ideas on how to make it work, or why it doesn't work at all?

Here's my output udevadm

share|improve this question
I don't have your exact hardware so I can't say for sure...I do have an answer related to udev rules here… ... Maybe if you do that first part of my answer udevadm info whatever and put the output on and add a link to it – RobotHumans Jun 6 '12 at 13:37
Sure thing, here's the output together with the command: – Anton Jun 6 '12 at 13:54
Thank you ) It seems that considering the googled answers is not a good option, I never used udev so close before and everywhere on the Net they write "SYSFS" or "ATTR" don't know why I didn't try copying the output directly. Now the correct working string is: SUBSYSTEMS=="usb", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", NAME:="ttyUSBavr", MODE="0666" – Anton Jun 6 '12 at 14:05
up vote 1 down vote accepted

If the former works, I suspect the latter should read

SUBSYSTEM=="usb", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="0666"
share|improve this answer
Thanks for looking into this ) – Anton Jun 6 '12 at 14:09
No problem. We're here b/c we like to help. This came up in chat the other day as well, so I thought looking at it was even more worthwhile – RobotHumans Jun 6 '12 at 14:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.