Skip to content
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

Mention setcap(8)-fix in EPERM error on Linux #108

Merged
merged 1 commit into from
Jan 11, 2020

Conversation

Ma27
Copy link
Contributor

@Ma27 Ma27 commented Jan 10, 2020

This is already mentioned in the README, but I figured that it might be
helpful to point linux-users to this if they try to run bandwhich
right after installing it and encountering this kind of error.

@imsnif
Copy link
Owner

imsnif commented Jan 10, 2020

Hey - thanks for this!

My opinion right now is that this might be a little too much. I'd like for our interaction with the user to be as clear and concise as possible. I think the "sudo" suggestion is just there to give most users a way they're familiar with to solve the current problem quickly. But I'm open to be convinced otherwise if you disagree.

@Ma27
Copy link
Contributor Author

Ma27 commented Jan 10, 2020

The thing is, when using sudo, the entire program has root permissions and is executed in the root environment (unless you use sudo -E though) while just a few permissions would be granted with the setcap wrapper. Also it might possible then to allow non-sudoers to use bandwhich by creating a bandwhich group and let it own the bandwhich binary.

I agree though that the message might seem a bit bloated. While the macOS-message is fine, I'd suggest something like this for Linux:

nsufficient permissions to listen on network interface(s). Please try one of the following fixes:

* run bandwhich with sudo
* create a `setcap(8)` wrapper for `bandwhich` with the permissions `cap_net_raw,cap_net_admin+ep`

@imsnif
Copy link
Owner

imsnif commented Jan 10, 2020

Sounds good, let's do it.

This is already mentioned in the README, but I figured that it might be
helpful to point linux-users to this if they try to run `bandwhich`
right after installing it and encountering this kind of error.
@Ma27 Ma27 force-pushed the mention-setcap-rules-in-error branch from 1809cfa to 2116b6c Compare January 10, 2020 18:00
@imsnif
Copy link
Owner

imsnif commented Jan 11, 2020

Looks great, thanks!

@imsnif imsnif merged commit ec75411 into imsnif:master Jan 11, 2020
@Ma27 Ma27 deleted the mention-setcap-rules-in-error branch January 11, 2020 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants