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.
Asked
Active
Viewed 3.1k times
1 Answers
14
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
setcapcommand exists in/sbin/. The commandwhereis setcapwill tell you if it exists. - If the
setcapcommand exists, run this command:sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap(If this errors, use/usr/sbin/dumpcapinstead of the path listed here already) - Add your user to the
wiresharkgroup -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/dumpcapinstead of the specified path.)sudo chmod u+s /usr/bin/dumpcap(If this errors, use/usr/sbin/dumpcapinstead of the specified path.)
Thomas Ward
- 78,878