Score:0

chromium+xdg-open Wireshark from an URL scheme handler: Couldn't run /usr/bin/dumpcap in child process: Permission denied

gs flag

I need to start the local Wireshark from the web user interface of a web service to immediately start a capture session, using some external capture plugin to connect to the web service. When using Firefox, starting Wireshark and then packet capture works. When using Chromium, Wireshark starts but then packet capture fails as /usr/bin/dumpcap seems to be restricted.

  • installed Wireshark so that it can be used from non-root users.
  • added my user to the wireshark group: sudo gpasswd -a $USER wireshark
  • started wireshark from a bash terminal and successfully started a capture.

Next, I registered a desktop entry (xdg-settings set default-url-scheme-handler xxx xxx.desktop):

[Desktop Entry]
Encoding=UTF-8
Name=Remote Capture URL Handler
Type=Application
Exec=wireshark -k -i xxx -o extcap.xxx.url:%u
MimeType=x-scheme-handler/xxx
Terminal=false
NoDisplay=true
Categories=Utility

Clicking on an xxx:// link correctly starts Wireshark, but then Wireshark cannot start dumpcap:

Couldn't run /usr/bin/dumpcap in child process: Permission denied

Dumpcap has POSIX file capabilities set, but it looks like the chromium sandboxing might be changing the bounding capabilities?

$ ls -l `which dumpcap`
-rwxr-xr-- 1 root wireshark 121344 Mar 15 18:01 /usr/bin/dumpcap
$ getcap `which dumpcap`
/usr/bin/dumpcap cap_net_admin,cap_net_raw=eip

How can I register my application with chromium to be correctly started with the users full rights so that Wireshark is able to run dumpcap?

N0rbert avatar
zw flag
Does this answer your question? [How to run Wireshark on Ubuntu 17.10](https://askubuntu.com/a/969173/66509)
gs flag
Unfortunately, no. I've updated the Q with more details.
gs flag
It occurred to me to try with Firefox where it actually works. So this is related to how chromium starts xdg-open...?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.