0

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

MelBurslan
  • 6,966
TJM
  • 554
  • I still could not understand fully: do you want safer or easier solution? Setting file setgid which is executable only by wireshark group members looks much easier and does not require sudo usage. Try this: chmod 2710 /usr/bin/dumpcap. Maybe I just do not understand something. –  Apr 27 '16 at 16:48
  • Is that supposed to be "sudo -g" (lower-case)? 2. does newgrp wireshark; wireshark-gtk allow you to do what you want without sudo?
  • – Jeff Schaller Apr 27 '16 at 16:57
  • I somehow managed to mess with setuid/setgid. Of course chmod 4710 /usr/bin/dumpcap. Time to sleep. –  Apr 27 '16 at 17:20