Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Arduino program only works when run as root

Uploading simple sketches seems to work when I run the Arduino program as root (sudo). I would like to run it as a regular user. Has anyone faced the same problem before and fixed it?

Here is what I obtained from lsusb:

$ lsusb
Bus 002 Device 022: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)

And the Arduino program identifies it as /dev/ttyACM0. Here are its permissions:

$ ls -l /dev/ttyACM0 
crw-rw---T 1 root dialout 166, 0 Mar 14 22:03 /dev/ttyACM0

Here is the output from id

groups=1000(abhiram),20(dialout),24(cdrom),25(floppy),29(audio),
30(dip),44(video),46(plugdev),105(scanner),110(bluetooth),112(netdev)

When I upload an sketch from the examples, as a regular user, I encounter this error:

avrdude:stk500_recv(): programmer not responding

Any suggestions are welcome.

Answer*

Cancel
2
  • Yes, it's worth checking the actual owning group. Also the device file can be either a ttyUSB# or a ttyACM# (or theoretically anything) depending on the board type, kernel driver, and ultimately configuration of udev or whatever creates the nodes. Commented Apr 6, 2014 at 0:18
  • It's also mentioned at arduino.cc/en/Guide/Linux#toc6 Commented Mar 18, 2017 at 22:43