Serial port "Permission denied" error on Fedora 33 LXDE

Hi,

Posting this to separate topic so it’s easier to find.

As discussed in topic Moving from Arduino IDE to Embeetle - #8 by joyzpa, I had a problem that the serial port on my linux system refused to open when trying to flash my project to Arduino board. This was (after selecting the right serial port in the probe section of the dashboard as pointed out by @kristof :wink:), caused by insufficient permissions.

Ygramoel’s fix for the permissions in Moving from Arduino IDE to Embeetle - #11 by ygramoel, didn’t work for me (could be a Fedora/Ubuntu difference related problem), but it certainly set me to right direction. Thanks for that @ygramoel.

In my case, the permission issue was fixed by following commands.

Check the group that owns the device (in my case it was ‘dialout’ as shown below):

$ ls -l /dev/ttyUSB*
crw-rw----. 1 root dialout 188, 0 Jul 23 17:41 /dev/ttyUSB0

Then to get access rights to the device, add the user (a user that is used to run the Embeetle) to the group that owns the serial port device:

$ sudo usermod -a -G dialout <username>

In my case, I just made a full reboot of the system, but it might work if the user is logged out and then logged back in again.

Niko

2 Likes

Thank you very much @joyzpa for describing the issue and the solution in such detail! This can be very helpful for other users :+1:
I’ll try to find time to add your post also to our website.

Kind regards,
Kristof

Yes, thank you @joyzpa for your feedback. I made me realize that the procedure currently documented on our website is unnecessarily complex: it is actually sufficient to check what the group of the serial device is, and add yourself to that group, just like you that. There is no need to change the group of the serial device to plugdev.

After adding yourself to the group, I can confirm that it is sufficient to log out and back in; no need to reboot.

@kristof I think we should implement several changes:

  • change the explanation on our website

  • change the title. The error observed in Embeetle is usually not “Libusb failure”, but rather something like “Permission denied”

  • when you select a serial device in Embeetle, immediately check that the current user has RW rights on that device; if not, pop-up a helpful message showing the command to use to fix the issue:

sudo usermod -a -G dialout $USER

(using the actual group of the serial device instead of dialout, of course)

The new method is simple enough to explain in a short popup; no need to point to the website.

2 Likes