Avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied

I get the following error when attempting to upload to an Arduino Uno R3:

Sketch uses 1768 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 30 bytes (1%) of dynamic memory, leaving 2018 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
Failed uploading: uploading error: exit status 1

I am using a Dell XPS-8950 desktop computer running Ubuntu 22.04.2 LTS and Arduino IDE Version: 2.1.0, Date: 2023-04-19T07:36:48.927Z, CLI Version: 0.32.2.

I have tried resetting the Arduino, changing the USB port the Arduino is connected to, reinstalling Arduino IDE, and rebooting the computer.

This is a new computer purchased recently to replace a failed laptop. I did not have this problem with the laptop, and have only encountered it now.

Any suggestions would be greatly appreciated.

This may help:

4 Likes

Thank you @Budvar10 for the link and suggestion. The instructions on the link resolved my issue.

Per the link, I added my username to the dialout group. I entered

sudo usermod -a -G dialout username

in a terminal window and then rebooted the computer. After that I was able to successfully upload a sketch the Arduino board.

You did not have to reboot :wink: A log out / log in would have achieved the same.

Those user specific settings are set when you log in.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.