Skip to content

Pcap need elevated privileges #2

@fabiodellafiorentina

Description

@fabiodellafiorentina

I receive the error below from node red:

Error: socket: Operation not permitted
at new PcapSession (/home/pi/.node-red/node_modules/pcap/pcap.js:49:39)
at Object.exports.createSession (/home/pi/.node-red/node_modules/pcap/pcap.js:123:12)
at create_session (/home/pi/.node-red/node_modules/node-red-contrib-amazondash/node_modules/node-dash-button/index. js:12:28)
at register (/home/pi/.node-red/node_modules/node-red-contrib-amazondash/node_modules/node-dash-button/index.js:29: 24)
at new node (/home/pi/.node-red/node_modules/node-red-contrib-amazondash/button-pressed.js:14:20)
at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:302:18)
at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:87:35)
at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:277:29)
at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30)
at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4)
at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4)
at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13)
at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19)
at Scheduler.drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:27:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Failed to create pcap session: couldn't find devices to listen on.
Try running with elevated privileges via 'sudo'
6 Jan 23:03:35 - [error] [ButtonPressed:79260a05.2b2d34] Error: Error: No devices to listen

I understand I need to run Pcap with higher privileges. Do you have any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions