-
Notifications
You must be signed in to change notification settings - Fork 2
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
Equivalent of --map-root-user #1
Comments
@douglas-raillard-arm that sounds good, would you like to send in a PR? |
I unfortunately don't have the bandwidth at the moment, I guess I did not really require the feature in the end or found a workaround, I cannot remember. Let's leave it opened so that people understand what happens if they hit the issue, as the kernel is not particularly verbose when something goes wrong |
Just for anyone who comes by (since I also ran into this issue), I ended up writing the mapping to
|
The current state of my code is there and has worked for a while now. It also takes care of spinning up a sub process and transferring logging back to the main process to be as transparent as possible. |
if I run from the shell "unshare -rm" (which does unshare (NEWNS|NEWUSER)" it works, but whenever I call unshare from python be it with ffi or ctypes or this unshare component, I get invalid error or permission denied. Somehow it seems that the NEWNS must gets executed after the NEWUSER... when that when I use -rm directly in shell it seems to work, yet the C code of unshare seems to be calling it the same way as in the Python code. |
Maybe you are running in a more restricted environment like a container ? The Python source I shared above has been used by my team for quite a while now and it works well AFAIK on a typical Ubuntu setup. |
Hi,
For some reason on my system
unshare -m
is not permitted as a regular user unless--map-root-user
is also used. Given the general usefulness of--map-root-user
, would you consider adding a similar option tounshare.unshare()
Python function ?Regards,
Douglas
The text was updated successfully, but these errors were encountered: