question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adapter state still unauthorized even after running setcap cap_net_raw+eip

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:38 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cropabcommented, Dec 21, 2018

@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.

1reaction
hanhdtcommented, Sep 6, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

noble warning - MBIENTLAB
noble warning : adapter state unauthorized, please run as root or with sudo or see README for information on running without root/sudo ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found