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

Proot not working properly #255

Closed
Zoradius opened this issue Oct 3, 2020 · 6 comments
Closed

Proot not working properly #255

Zoradius opened this issue Oct 3, 2020 · 6 comments

Comments

@Zoradius
Copy link

Zoradius commented Oct 3, 2020

Hello everyone,

I've been trying to run JuNest for a bit now (really love the idea), but as I am unprivileged and namespaces are disabled (on Debian GNU/Linux 10) I have to work in proot mode. However once I start up junest proot I get the following message:
proot info: pid 852541: terminated with signal 11
Warn: Proot is not properly working. Disabling SECCOMP and expect the application to run slowly in particular when it uses syscalls intensively.
As I am not too savy I have since compiled proot seperately and it seems to work fine, but I really want the ease of use of JuNest. Is there a way to specify the proot directory or does anyone have a tip regarding the above error message?

Thanks in advance.

Edit: Spelling

@fsquillace
Copy link
Owner

Hi, that's a fair concern. Have you try to use --backend-command to specify your proot binary?

@ceen23
Copy link

ceen23 commented Nov 19, 2020

I have the same problem and dont understand @fsquillace answer.
Using Debian hence junest ns doesnt work I need to get Proot to work.

@fsquillace
Copy link
Owner

The current version of proot used by junest may not work properly for such system like debian. If you compile proot you will get a new binary which you can use together with junest:

junest proot --backend-command /path/to/the/new/compiled/proot

Hopefully that makes things working.

@Zoradius
Copy link
Author

It has been a while and I just came back to JuNest. First of all thanks for the reply.
Here is what happens when using the suggested command:

junest proot --backend-command /home/users/USER/.local/share/proot/src/proot
proot warning: can't sanitize binding "/home/users/USER -b /tmp -b /proc -b /sys -b /dev -r /home/users/USER/.junest ": No such file or directory
/bin/sh: 0: Illegal option --

It seems to me that the backend arguments for proot got messed up somehow, as the rest of the argument string is treated as a binding directory (which cannot be found). I've quickly scanned through the source code and the problem seems to be in the run_env_as_proot_user function in "lib/core/proot.sh".
Again I'm not too knowledgeable in terms of argument handling in bash or shell scripts or I would try hot-fixing this myself.

Kind regards.

@fsquillace
Copy link
Owner

Thanks @Zoradius . I also replicated the bug. As you said, the issue is in lib/core/proot.sh line 19.

A quick fix could be to replace the line with:

PROOT="${backend_command}" JUNEST_ENV=1 "proot_cmd" "${backend_args}" "${DEFAULT_SH[@]}" "${args[@]}"

I will fix this in the next days.

@fsquillace
Copy link
Owner

Issue fixed. You should be able to run the proot binary with the --backend-command option now.

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

3 participants