Arduino: /dev/ttyACM0 – Permission Denied [SOLVED]

If you use an Arduino IDE on Linux (e.g. Ubuntu, Linux Mint, etc.), you may get the following errors while trying to upload a sketch to the Arduino broad:

Caused by: processing.app.SerialException: Error touching serial port ‘/dev/ttyACM0’.
– and –
Caused by: jssc.SerialPortException: Port name – /dev/ttyACM0; Method name – openPort(); Exception type – Permission denied.

In this note i am showing how to permanently fix the “Permission denied” error on the serial port /dev/ttyACM0 while uploading the Arduino sketch.

Cool Tip: Add “Arduino Pro Micro” board to the Arduino IDE! Read more →

Fix Permission Denied on /dev/ttyACM0

The /dev/ttyACM0 device has the group of dialout:

$ stat /dev/ttyACM0
- sample output -
  File: /dev/ttyACM0
  Size: 0         	Blocks: 0          IO Block: 4096   character special file
Device: 6h/6d	Inode: 345         Links: 1     Device type: a6,0
Access: (0660/crw-rw----)  Uid: (    0/    root)   Gid: (   20/ dialout)

The members of the dialout group have full and direct access to serial ports.

To permanently solve the issue with the permissions for /dev/ttyACM0, all you need is to add your user to the dialout group:

$ sudo usermod -a -G dialout <username>

Logout and then log back in for the group changes to take effect.

After that you should be able to upload your sketch to the Arduino broad connected to the serial port /dev/ttyACM0 without any “Permission denied” errors.

Cool Tip: Simulate keystrokes using the Arduino boards! Read more →

One Reply to “Arduino: /dev/ttyACM0 – Permission Denied [SOLVED]”

  1. Marcos Antonio Bezerra de Carvalho says: Reply

    Resolveu meu problema do arduino 2.0 RC6. Obrigado!

Leave a Reply