Wireshark is not able to capture on any of the interfaces [duplicate]
I just switched to Ubuntu from openSuse where I used wireshark with no problem. Now I receive the error that "You don't have permission to capture on that device" referring to my 802.11 wifi. I have root privileges but not running as root. I installed Wireshark from the Ubuntu software Center. Solution please.
Try these steps. These steps will set network privileges for the dumpcap
executable, if your kernel and the file system supports file capabilities. (source)
- Check if the
setcap
command exists in/sbin/
. The commandwhereis setcap
will tell you if it exists. - If the
setcap
command exists, run this command:sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap
(If this errors, use/usr/sbin/dumpcap
instead of the path listed here already) - Add your user to the
wireshark
group -sudo usermod -a -G wireshark $USER
- Log all the way out, then login again.
- Start Wireshark as a non-root user and see if you can do a live capture.
If that does not work, you may have to use the set-UID method if your kernel doesn't support the above commands:
-
sudo chown root /usr/bin/dumpcap
(If this errors, use/usr/sbin/dumpcap
instead of the specified path.) -
sudo chmod u+s /usr/bin/dumpcap
(If this errors, use/usr/sbin/dumpcap
instead of the specified path.)