Serial port access denied in Ubuntu 24.04.3 LTS

Ubuntu Version**: 24.04.3 LTS

Problem Access to serial port denied

I am trying to access the serial port through node-red. My settings are supposed to be OK: 115,200 bauds, 8N1

Error message:

> sudo dmesg | grep tty
   
[    0.195802] printk: legacy console [tty0] enabled
[    0.698954] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.726262] 0000:00:16.3: ttyS4 at I/O 0xf0a0 (irq = 19, base_baud = 115200) is a 16550A
[    4.309636] usb 1-4: ch341-uart converter now attached to ttyUSB0
[   16.423125] audit: type=1400 audit(1761599490.157:170): apparmor="DENIED" operation="open" class="file" profile="snap.node-red.node-red" name="/dev/ttyUSB0" pid=1359 comm="node" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[   31.432819] audit: type=1400 audit(1761599505.166:171): apparmor="DENIED" operation="open" class="file" profile="snap.node-red.node-red" name="/dev/ttyUSB0" pid=1359 comm="node" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0

What I’ve Tried:

  1. Make sure I am a member of the “dialout” group:
> echo $USER
  pisabell

> groups
  pisabell adm tty dialout cdrom sudo dip plugdev users lpadmin
  1. Make sure permissions on /dev/ttyUSB0 are 660:
>  ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 oct.  28 11:15 /dev/ttyUSB0

and 3) Make sure no other process is holding the serial port:

>  lsof /dev/ttyUSB0
   [empty response]

The problem persists despite the above settings. Any help will be greatly appreciated.

Welcome to Ubuntu Discourse :slight_smile:

Can you please clarify and edit which version you are using.

Title shows 24.4.3 (which is not the correct format anyway) while the post shows 22.04.3

Thanks

1 Like

The identifier that gets printed when I start the core is “24.04.3 LTS”.
Apologies for the confusion.

1 Like

Since you are using the node-red snap you will need to do some extra steps to enable USB serial hotplugging for snap packages and connect the node-red serial-port snap interface like described here:

1 Like