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

Is there any hope to run junest on this shared hosting config? #251

Open
rahulraj80 opened this issue Jul 6, 2020 · 3 comments
Open

Is there any hope to run junest on this shared hosting config? #251

rahulraj80 opened this issue Jul 6, 2020 · 3 comments

Comments

@rahulraj80
Copy link

[Newbie alert] Let me know if I should share some more info:

user~ 20:16:03 :( > uname -a

Linux xxxxx 4.14.146-225.ELK.el6.x86_64 #1 SMP Sat Sep 21 01:19:55 CDT 2019 x86_64 x86_64 x86_64 GNU/Linux

user~ 20:16:03 :( > lsb_release -a

LSB Version:
Distributor ID: n/a
Description:    (none)
Release:        n/a
Codename:       n/a

user ~ 20:12:16 :) > junest
OR
user ~ 20:13:33 :( > junest ns
OR
user ~ 20:13:42 :( > junest -f

Could not understand if user namespace is enabled. No config.gz file found. Proceeding anyway...
bwrap: No permissions to creating new namespace, likely because the kernel does not allow non-privileged user namespaces. On e.g. debian this can be enabled with 'sysctl kernel.unprivileged_userns_clone=1'.
Error: Something went wrong while executing bwrap command. Exiting

user ~ 20:13:46 :( > junest g

This script must be run with root privileges

user ~ 20:13:52 :( > junest p
OR
user ~ 20:13:56 :( > junest p -f

proot error: execve("/usr/bin/sh"): Permission denied
proot info: possible causes:
  * the program is a script but its interpreter (eg. /bin/sh) was not found;
  * the program is an ELF but its interpreter (eg. ld-linux.so) was not found;
  * the program is a foreign binary but qemu was not specified;
  * qemu does not work correctly (if specified);
  * the loader was not found or doesn't work.
fatal error: see `proot-x86_64 --help`.
proot info: pid 1289: terminated with signal 11
proot error: execve("/usr/bin/sh"): Permission denied
proot info: possible causes:
  * the program is a script but its interpreter (eg. /bin/sh) was not found;
  * the program is an ELF but its interpreter (eg. ld-linux.so) was not found;
  * the program is a foreign binary but qemu was not specified;
  * qemu does not work correctly (if specified);
  * the loader was not found or doesn't work.
fatal error: see `proot-x86_64 --help`.
proot error: can't chmod '/tmp/proot-1290-ognELf': No such file or directory
Error: Something went wrong with proot command. Exiting
@fsquillace
Copy link
Owner

Mmh this host seems tricky. It does not look like it has user NS enabled. You can't even modify files into /tmp?

@rahulraj80
Copy link
Author

Hi,

I can modify, but cannot execute from that directory:

fy@cp-ht-8 ~ 22:06:40 :) > cd /tmp
fy@cp-ht-8 tmp 22:07:03 :( > nano test.sh
fy@cp-ht-8 tmp 22:07:33 :) > chmod +x test.sh
fy@cp-ht-8 tmp 22:07:42 :) > ./test.sh
-jailshell: ./test.sh: Permission denied

fy@cp-ht-8 tmp 22:07:57 :( > cat test.sh
#!/bin/bash
echo "OK"

@fsquillace
Copy link
Owner

That's may explain why proot mode does not work. Proot creates a temporary executable file under /tmp. In your example is: /tmp/proot-1290-ognELf.

Regarding the other namespace mode, the user NS is not enabled therefore it is not possible to do run it either.

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

2 participants