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

Confusing error message when run without sufficient permissions #167

Open
joshtriplett opened this issue Jun 19, 2024 · 0 comments
Open

Comments

@joshtriplett
Copy link
Contributor

Running nbd-client as non-root produces this error:

Error: Failed to setup device, check dmesg

dmesg has nothing in it, however.

As it turns out, the actual error here was that I forgot to run nbd-client as root.

It does look like the netlink error that comes back from the kernel has an -EPERM in it.

Please consider either:

  1. Using a netlink API that gives back this error from the kernel, and displays the corresponding message, or
  2. When this error occurs, checking if the user has permissions, and if not, giving the hint that this may be a permission error, or
  3. Making this error message more generic, and just always showing the hint to check permissions.
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

No branches or pull requests

1 participant