node-red usb permission denied

Hi! i recently bought a nano pi neo 3 and installed dietpi and node-red, from the palette manager installed serial and when i plugged in an esp 8266 in the usb port and selected it with the correct bauds…

it says permission denied…
Temporary solution:

/////
sudo chmod 666 /dev/ttyUSB0
/////

this solution i’ve found it in a node red forum:
https://discourse.nodered.org/t/serial-port-issue-permission-denied-cannot-open-dev-ttyacm0/4500/3

in that link the user ncherry proposed this:
sudo user -a -G dialout node-red

But it simply doesn’t recognize the comand “user”…

any help will be apreciated

To add a user to a 2nd group, you would need to use usermod instead of user like

usermod -a -G examplegroup exampleusername

https://www.howtogeek.com/50787/add-a-user-to-a-group-or-second-group-on-linux/

Thanks - a - Lot!!!
it works like charm!

////------WORKS---------////////
usermod -a -G dialout nodered

the user is nodered not node-red <---- i can see which user is simply with “htop” command