noble: Adapter state still unauthorized even after running setcap cap_net_raw+eip
I am running a couple of node tools that use noble. Both are requiring me to run as root despite running:
sudo setcap cap_net_raw+eip $(eval readlink -f
which node)
Error is:
noble warning: adapter state unauthorized, please run as root or with sudo
or see README for information on running without root/sudo:
https://github.com/sandeepmistry/noble#running-on-linux
The output of which node
is /home/scott/.nvm/versions/node/v6.10.2/bin/node
.
The output of sudo getcap $(eval readlink -f
which node)
is /home/scott/.nvm/versions/node/v6.10.2/bin/node = cap_net_raw+eip
I have also created a symlink for root so the latest version of node is also available at /usr/local/bin/node
.
I believe my issue may be caused by using NVM to manage node but cannot be 100% certain.
Any tips of what I might be able to do to debug this some more?
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 1
- Comments: 38
@ctangc5
after running this command:
sudo setcap cap_net_raw,cap_net_admin+eip $(eval readlink -f which node)
the noble permission warning disappeared and after a restart node-red-contrib-xiaomi-ble started reading my mijia sensor.
ps: this will only work in node red with node 8.
I also have the same issue and results as above on Ubuntu 18.04.
For me
getcap $(eval readlink -f
which node)
output is/usr/local/bin/node = cap_net_admin,cap_net_raw+eip
I’m working on an Electron app.
@WayneKeenan could you please support a PR to the docs for this 😃
Just wondering if there has been any progress on this as I’m experiencing the same issue.