Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: joaomach on May 25, 2021, 05:39:58 PM

Title: Jailkit appears to be broken!
Post by: joaomach on May 25, 2021, 05:39:58 PM
My server is up and running, running very well I may add. But I do have an issue with jailkit.

I have a user that needs shell access to run a Drupal site,  but he wants to use Composer.

I gave his account shell access through the Jailkit, and after setting up ssh keys, he is able to login with no issues.
The problem is that he cannot access many things, like nano gives the error: "Error opening terminal: unknown", and nano is listed in /home/jail/bobby/bin.

How can this be fixed properly?

Title: Re: Jailkit appears to be broken!
Post by: josephgodwinke on May 26, 2021, 01:39:33 PM
terminal is not interactive
Title: Re: Jailkit appears to be broken!
Post by: josephgodwinke on May 26, 2021, 01:40:13 PM
He can use vi instead
Title: Re: Jailkit appears to be broken!
Post by: joaomach on May 26, 2021, 09:24:50 PM
OK, So I am closer to finding the problem...

so when I run echo "$PATH" I get the following path
Code: [Select]
/usr/local/bin:/usr/bin

It turns out that the bin directory is located in the jail directory but not in the users /home directory so the user cannot of course access any but basic commands.

jailkit is defenitly broken!

The paths in .bash_profile do not work either because the /home/jail is not in the users path... Jailkit is essentially unusable.


Title: Re: Jailkit appears to be broken!
Post by: joaomach on May 29, 2021, 04:39:41 PM
Well, it turns out that jailkit is not broken, it was just the particular commands that I  needed were not  available to the user. I purchased a one time support ticket, and they were able to add them for me and all is working now.

As a reference, the commands I needed were: nano, php, curl, clear
If you need any of these either figure out how to add them using jailkit man pages or pay them $8 and they will do it quickly.

I spent enough time trying to figure it out, $8 was worth it for me.