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:
- Make sure I am a member of the “dialout” group:
> echo $USER
pisabell
> groups
pisabell adm tty dialout cdrom sudo dip plugdev users lpadmin
- 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.