sngrep icon indicating copy to clipboard operation
sngrep copied to clipboard

Couldn't activate capture: socket: Operation not permitted

Open lrqxyz opened this issue 3 years ago • 1 comments

Hello, I am having a problem running the sngrep command for non-root users.

When I run the command I get the error:

Couldn't activate capture: socket: Operation not permitted

How to allow execution of the command for non-root users?

Thanks!

lrqxyz avatar Jun 07 '22 21:06 lrqxyz

Hi @lrqxyz !

We rarely use sngrep with non privileged users, but according to wiki, you can try the following:

https://github.com/irontec/sngrep/wiki#command-line-arguments

Linux users may add capture permissions to sngrep to avoid run it as root

setcap 'CAP_NET_RAW+eip' /usr/local/bin/sngrep

if the above does not work, try this:

setcap 'CAP_NET_RAW+eip' /usr/bin/sngrep

Regards!

Kaian avatar Jun 08 '22 08:06 Kaian