-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
termshark doesn't give sufficient error for non-root users #4
Comments
Thanks for the report, I'll try to improve that. |
@sagis-tikal This is an issue if capturing with command |
I ran into this to I got "Could not find network interface vcan0" but the problem was my permissions a more descriptive error or just adding the age ol "Are you root?" to the existing error message would be an improvement. running with sudo fixed it. |
Permission ErrorsThis is tshark's permission error: tshark: Couldn't run /usr/bin/dumpcap in child process: Permission denied Checking in an Ubuntu VM, this is what I get for termshark without sudo: Cannot capture on interface ciscodump: fork/exec /usr/bin/dumpcap: permission denied (exit code -1)
See https://wiki.wireshark.org/CaptureSetup/CapturePrivileges for more info. Which is plenty informative, and better than tshark's error message. Need InfoCan users experiencing this issue please post
|
I think I have introduced a regression in termshark v2. I'll look at making this more informative. |
I added a more useful comment - to run a setcap command, and as @mr-sour suggested, the good old-fashioned "use root" ;-) If you want to try it, the latest can be installed with go get github.com/gcla/termshark/v2/cmd/termshark@master |
I added this link too: https://termshark.io/no-root I'll close this issue now. |
When termshark is executed with no parameters and not as root it will print the following error:
"INFO[0004] tshark: Couldn't run /usr/bin/dumpcap in child process: Permission denied"
Tried to use both the pre-compiled version and to compile it using the with GO111MODULE=on
termshark version: 1.0.0
tshark version: TShark (Wireshark) 3.0.1 (Git)
OS version: 4.19.35-1-MANJARO (inside of a VirtualBox VM)
The text was updated successfully, but these errors were encountered: