"Error: Error: Permission denied, cannot open /dev/ttyUSB0"

Hello Community,
To begin with, I would like to say that I have already read various posts on this topic, but unfortunately they have not led to success.
I run Node-Red on an OpenSuseLeap 15.4.
I use the node “Node-red-contrib-Modbus” in connection with USB0 to read out a Modbus slave.
If I use
mbpoll -a 1 -b 38400 -s 2 -P none -t 4 -r 102 -c 2 /dev/ttyUSB0
everything works perfectly.

lsof /dev/ttyUSB0
shows me that nobody is blocking the interface.

Also executed:
sudo usermod -a -G dialout root
sudo usermod -a -G dialout node-red

These are the users of the “dialout” group
grep '^dialout' /etc/group
dialout:x:490:root,node-red

These are the rights for /dev/ttyUSB0
ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Sep 11 15:13 /dev/ttyUSB0

All node-red processes are executed by root.
This is my flow:
flows.json (2.6 KB)

I know you have said it’s running as root (not really recommended BTW)

But what do you get when you run whoami in an exec node. Does it show root?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.