irontec / sngrep

Ncurses SIP Messages flow viewer
GNU General Public License v3.0
1.02k stars 187 forks source link

request: default install path to sbin #137

Closed jungle-boogie closed 8 years ago

jungle-boogie commented 8 years ago

Hi,

I propose the default install path be changed from either /usr/local/bin/sngrep or /usr/bin/sngrep

to /usr/local/sbin/sngrep or /usr/sbin/sngrep

In other words, since root access is needed, move to correct directory location.

Kaian commented 8 years ago

Hi!

The default path (that I think can be changed in configure time) was based on the original location of ngrep binaries as this tool was born as its output parser. sngrep should be usuable by non-root users in offline mode (that's how I check the code while I'm programing).

I'm not an expert on this standards, so any kind of feedback is appreciated :)

jungle-boogie commented 8 years ago

I'm sure the install path can be changed at install time, but I don't think that really happens very often by the users. (just my guess).

ngrep in live mode, like sngrep, requires root access since it's using the network interface. Your point is valid about using sngrep in an offline manner and not requiring root and mine is valid when using in online mode. :) :) Can't really have it installed in BOTH places so now knowing your reasons, I like it better.

thanks!

nshopik commented 8 years ago

root aren't necessary even for live capture, just few capabilites which can be given special group

chgrp wireshark /usr/local/bin/sngrep
chmod 750 /usr/local/bin/sngrep
setcap cap_net_raw,cap_net_admin=eip /usr/local/bin/sngrep

And don't forget add yourself to that group.

usermod -a -G wireshark `whoami`
Kaian commented 8 years ago

You could also use suid perms, but I would never recommend to do so :grin: