[tjm@ArchPad bin]$ LANG=en
[tjm@ArchPad bin]$ pwd
/usr/bin
[tjm@ArchPad bin]$ ll | grep wireshark
-rwxr-x--- 1 root wireshark 88K Apr 25 00:22 dumpcap
-rwxr-xr-x 1 root wireshark 2.0M Apr 25 00:23 wireshark-gtk
[tjm@ArchPad bin]$ groups `whoami`
wheel wireshark users
[tjm@ArchPad bin]$
With command sudo -G wireshark wireshark-gtk
, I can start wireshark-gtk and listen with out any problems.
But, if I simply run wireshark-gtk
it says that :
Could not run /usr/bin/dumpcap in child process: Permission denied.
So, it is availible to set a group priority, which means that if I (the user) have a group id same as a file, and the file has been set group prority, I will run this file in this group id without sudo -G
?
By the way, setgid
is not what I want, for it is not safe and anyone can run this file with group privilege.
wireshark
group members looks much easier and does not requiresudo
usage. Try this:chmod 2710 /usr/bin/dumpcap
. Maybe I just do not understand something. – Apr 27 '16 at 16:48newgrp wireshark; wireshark-gtk
allow you to do what you want without sudo?chmod 4710 /usr/bin/dumpcap
. Time to sleep. – Apr 27 '16 at 17:20