Error on opening "dev/ttyACMO". Permission Denied.

I am using linux and when uploading my code to Uno, I am getting an error of opening device.

ERROR MESSAGE

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

Archiving built core (caching) in: /tmp/arduino_cache_76622/core/core_arduino_avr_uno_5ae566d2b74f299eedfb0fc6b9173d06.a
Sketch uses 998 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/ttyACM0 -b115200 -D -Uflash:w:/tmp/arduino_build_32373/H-bridge_test.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/ks/snap/arduino-mhall119/5/.avrduderc"
An error occurred while uploading the sketch
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyACM0
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "/dev/ttyACM0": No such file or directory

avrdude done. Thank you.

Have you done this?:
https://www.arduino.cc/en/guide/linux#toc6

FYI, that mhall119 snap package is an unofficial and outdated version of the Arduino IDE. I recommend that you always use the official Arduino IDE, downloaded from:

pert:
Have you done this?:
Arduino - Linux

FYI, that mhall119 snap package is an unofficial and outdated version of the Arduino IDE. I recommend that you always use the official Arduino IDE, downloaded from:
http://www.arduino.cc/en/Main/Software

The terminal says that the file cannot be opened. (using the link).

I downloaded the latest software.....

12944qwerty:
I downloaded the latest software.....

Did that solve the problem? I have seen reports of this error which were specific to the mhall119 package and resolved by using the official IDE.

pert:
Did that solve the problem? I have seen reports of this error which were specific to the mhall119 package and resolved by using the official IDE.

I am having trouble downloading and extracting the IDE on Linux...

Please provide a detailed description of the problem you're having.

pert:
Please provide a detailed description of the problem you're having.

Hi, I the download worked successfully but it wouldn't extract properly. I also wasn't able to run install.sh.

I decided to switch to Windows as it was working when I last used it but I am getting a different error when running it.
The error said it wasn't able to set com-state to COM.

12944qwerty:
it wouldn't extract properly.

That's odd. I've successfully extracted the 64 bit and Linux ARM IDE downloads (many times in the case of 64-bit because of using it in Travis CI builds). I haven't tried the 32-bit version.

12944qwerty:
The error said it wasn't able to set com-state to COM.

Make sure you have the correct port selected from the Tools > Port menu. Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don’t know which port is your Arduino, you can find it like this:

  • Unplug your Arduino board from the computer.
  • Tools > Port
  • Note the ports, if any, listed in the menu.
  • Close the Tools menu
  • Plug your Arduino board into the computer.
  • Tools > Port - The new port listed in the menu is your Arduino board.