-
Notifications
You must be signed in to change notification settings - Fork 46
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
"operation not permitted" opening a tun/tap device #78
Comments
|
Ok I came up with a much easier repro case: test.nix Then: Running |
|
I hate to bump old issues but I am running into this as well. I've been working on bundling bpftrace (bpftrace/bpftrace#2595) and anything that requires root seems to fail: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I'm trying to run nebula from within a nix-bundle'd binary (not using the AppImage builder yet) and am getting the following error:
When I run the entrypoint script directly, not using nix-bundle, it works fine. Afaict everything about the bundled binary is working correctly, it only seems to fail at making a new tun/tap device. This error occurs when running the binary via sudo and from a real root shell.
I have also managed to smuggle in my outer
PATHenvironment variable so that it's set within the entrypoint script, but that didn't affect anything. Similarly when I called${pkgs.iproute2}/bin/ip linkfrom the entrypoint script it correctly printed out all my network devices.You can see the code in nebula where it's creating the tun device here. Afaict it's doing everything through system calls, and not via some
execcall to an external binary, so I don't think there's any issue here with the process not being able to access some outside resource due to the chroot.The only thing I can think is that the chroot is preventing write access to
/devin some way? It appears to support read operations on/dev(based on my iproute2 test), but maybe the mapping code in the chroot utility doesn't account for writes. Does that make sense as a theory? My C++ isn't very good so I'm not very confident in it.In any case thanks for making such a useful tool! 🙏
The text was updated successfully, but these errors were encountered: