Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pass a USB device to node-RED docker - permission denied

Featured Replies

Hi

 

I am trying to connect an arduino pro micro via usb serial to the node-RED docker container, but i have no luck.

 

I have made a minimalistic arduino code that just outputs a number on the serial. 

When i connect the arduino to the unraid server, i can from the console use the screen command, to see the output on the serial port (/dev/ttyACM0)

 

I have then tried to map this device into the node-red docker by adding a new device into the docker, with the  value field to "/dev/ttyACM0"

 

Wheni then try to run node-RED with the serial port plugin, and try to set the serial port to /dev/ttyACM0 it tells me 

"serial port /dev/ttyACM0 error: Error: Error: Permission denied, cannot open /dev/ttyACM0"

I have also tried with the privileged mode.

Any ideas?

 

As bonus info, I have successfully connected to the serial port with a VM running windows as a test.

You probably need to change the permission on the host side so that the user in the container running the software have the rights to read/write to the device. 

If you want to be sure, do a chmod 777 /dev/ttyACM0 and restart the container. 

Edited by saarg

  • Author

Ok, i tried to do chmod 777 ttyACM0, and it worked.

But as far as i know, the permission will reset when restarted, right?

How do i make it persistent?

root@Hotbox:/dev# ls -l ttyACM0
crw-rw---- 1 root dialout 166, 0 Feb  1 00:45 ttyACM0
root@Hotbox:/dev# chmod 777 ttyACM0
root@Hotbox:/dev# ls -l ttyACM0
crwxrwxrwx 1 root dialout 166, 0 Feb  1 00:45 ttyACM0

 

10 hours ago, Struck said:

Ok, i tried to do chmod 777 ttyACM0, and it worked.

But as far as i know, the permission will reset when restarted, right?

How do i make it persistent?


root@Hotbox:/dev# ls -l ttyACM0
crw-rw---- 1 root dialout 166, 0 Feb  1 00:45 ttyACM0
root@Hotbox:/dev# chmod 777 ttyACM0
root@Hotbox:/dev# ls -l ttyACM0
crwxrwxrwx 1 root dialout 166, 0 Feb  1 00:45 ttyACM0

 

 

You just add it to your go file in /boot/config/go.

  • 3 years later...

OK, works for me as well by executing the "chmod 777 ttyUSB0" command. Tx for that hint.

Anyhow, how to edit the "/boot/config/go." file ???? May I missed that info somehwere so even a link to educate myself would be helpful

3 minutes ago, kuhnino said:

Anyhow, how to edit the "/boot/config/go." file ????

You could install the Config File editor plugin.

As always, if u know how, it´s soooo easy.

TX

2022-03-22 16_09_36-Koun-UNRAID_ConfigEdit.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.