Go Down

Topic: Permission denied on /dev/ttyACM0 (Read 86481 times) previous topic - next topic

mkikia

I'm having exactly the same issue. I have done all of the above. I am a member of the "dialout group", but I still get the error message:

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

I am trying to upload to my 3D printer Mega 2560. I am connecting the Mega from the USB port of my computer. The Mega 2560 is working as I have moved the steppers around and done some calibration as well through the graphics controller. The problem arose after I changed my computer. My operating system is Ubuntu 18.04 LTS.

Any help or advice will be greatly appreciated.

Thanks in advance

gbafamily

In Linux, the Arduino serial port is named /dev/ttyACMx where x starts at 0. If using a clone board, the serial port name may be /dev/ttyUSBx where x starts at 0.

charlescun

Arduino: 1.8.5 (Linux), Board: "Arduino/Genuino Uno"

/snap/arduino-mhall119/5/arduino-builder -dump-prefs -logger=machine -hardware /snap/arduino-mhall119/5/hardware -tools /snap/arduino-mhall119/5/tools-builder -tools /snap/arduino-mhall119/5/hardware/tools/avr -built-in-libraries /snap/arduino-mhall119/5/libraries -libraries /home/doncun/snap/arduino-mhall119/5/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path /tmp/arduino_build_659730 -warnings=all -build-cache /tmp/arduino_cache_412874 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/snap/arduino-mhall119/5/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/snap/arduino-mhall119/5/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/snap/arduino-mhall119/5/hardware/tools/avr -verbose /home/doncun/Documents/Arduino/Blink_led/Blink_led.ino
/snap/arduino-mhall119/5/arduino-builder -compile -logger=machine -hardware /snap/arduino-mhall119/5/hardware -tools /snap/arduino-mhall119/5/tools-builder -tools /snap/arduino-mhall119/5/hardware/tools/avr -built-in-libraries /snap/arduino-mhall119/5/libraries -libraries /home/doncun/snap/arduino-mhall119/5/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path /tmp/arduino_build_659730 -warnings=all -build-cache /tmp/arduino_cache_412874 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/snap/arduino-mhall119/5/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/snap/arduino-mhall119/5/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/snap/arduino-mhall119/5/hardware/tools/avr -verbose /home/doncun/Documents/Arduino/Blink_led/Blink_led.ino
Using board 'uno' from platform in folder: /snap/arduino-mhall119/5/hardware/arduino/avr
Using core 'arduino' from platform in folder: /snap/arduino-mhall119/5/hardware/arduino/avr
Detecting libraries used...
"/snap/arduino-mhall119/5/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/snap/arduino-mhall119/5/hardware/arduino/avr/cores/arduino" "-I/snap/arduino-mhall119/5/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_659730/sketch/Blink_led.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/snap/arduino-mhall119/5/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/snap/arduino-mhall119/5/hardware/arduino/avr/cores/arduino" "-I/snap/arduino-mhall119/5/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_659730/sketch/Blink_led.ino.cpp" -o "/tmp/arduino_build_659730/preproc/ctags_target_for_gcc_minus_e.cpp"
"/snap/arduino-mhall119/5/tools-builder/ctags/5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/arduino_build_659730/preproc/ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"/snap/arduino-mhall119/5/hardware/tools/avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/snap/arduino-mhall119/5/hardware/arduino/avr/cores/arduino" "-I/snap/arduino-mhall119/5/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_659730/sketch/Blink_led.ino.cpp" -o "/tmp/arduino_build_659730/sketch/Blink_led.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core
Linking everything together...
"/snap/arduino-mhall119/5/hardware/tools/avr/bin/avr-gcc" -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p  -o "/tmp/arduino_build_659730/Blink_led.ino.elf" "/tmp/arduino_build_659730/sketch/Blink_led.ino.cpp.o" "/tmp/arduino_build_659730/../arduino_cache_412874/core/core_arduino_avr_uno_5ae566d2b74f299eedfb0fc6b9173d06.a" "-L/tmp/arduino_build_659730" -lm
"/snap/arduino-mhall119/5/hardware/tools/avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0  "/tmp/arduino_build_659730/Blink_led.ino.elf" "/tmp/arduino_build_659730/Blink_led.ino.eep"
"/snap/arduino-mhall119/5/hardware/tools/avr/bin/avr-objcopy" -O ihex -R .eeprom  "/tmp/arduino_build_659730/Blink_led.ino.elf" "/tmp/arduino_build_659730/Blink_led.ino.hex"
Sketch uses 1092 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
/snap/arduino-mhall119/5/hardware/tools/avr/bin/avrdude -C/snap/arduino-mhall119/5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:/tmp/arduino_build_659730/Blink_led.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/snap/arduino-mhall119/5/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/doncun/snap/arduino-mhall119/5/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Error opening serial port '/dev/ttyUSB0'. Try consulting the documentation at http://playground.arduino.cc/Linux/All#Permission
processing.app.SerialException: Error opening serial port '/dev/ttyUSB0'. Try consulting the documentation at http://playground.arduino.cc/Linux/All#Permission

Go Up