Whenever I tried to upload code to my Arduino Uno I was getting this error message on the Arduino IDE which I installed as an Ubuntu snap:
can't open device "/dev/ttyACM0": Permission denied
Doing a quick search on the internet I found that the only 2 suggested solutions for this problem where running one or both of the following commands (with slight variations):
sudo usermod -a -G dialout $USER
sudo chmod a+rw /dev/ttyACM0
I tried them but they didn't work for me, after some time of troubleshooting I found out I needed to do this:
With the Arduino IDE closed go to the Ubuntu Software store and open up the Arduino IDE page, there select the "Permissions" button and on the window that pops up turn on the "Access USB hardware directly" option, that's it.
Just wanted to post this info somewhere in case some else might need it.

