If uploading software from the Arduino IDE or the commandline via avrdude to a microcontroller like an Arduino or an ESP8266 fails due to missing access rights ("Permission denied"), what helps is either
sudo chmod a+rw /dev/ttyUSB0
or adding the user to the group "dialout":
sudo usermod -a -G dialout theuser