[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Jailkit-dev] Can jk_chrootsh be used manually ?
From: |
Olivier Sessink |
Subject: |
Re: [Jailkit-dev] Can jk_chrootsh be used manually ? |
Date: |
Thu, 11 Jul 2013 14:18:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 |
On 07/11/2013 10:41 AM, Ashish Sharma wrote:
> Hi,
>
> I have jailkit perfectly setup on my server.
>
> I am trying to give web-access to the users. I have created a Terminal server
> ( http://github.com/pocha/terminal-server) using pty.js
> (https://github.com/chjj/pty.js).
>
> The part of code that creates a bash terminal for a user looks like
> ----------
> var term = pty.spawn('bash', [], {
> name: 'xterm-color',
> cols: 80,
> rows: 30,
> cwd: process.env.HOME,
> env: process.env
> });
> ---------
>
> By using uid & gid option of the API, I am able to launch the bash terminal
> as the user. But he is not really getting jailed.
> ---------
> var term = pty.spawn('bash', [], {
> name: 'xterm-color',
> cols: 80,
> rows: 30,
> uid: <uid of user>,
> gid: <gid of user>
> });
> ----------
>
> I am trying to 'login' a jailed user so that the bash terminal shows up with
> he being jailed. I was thinking that using '/usr/sbin/jk_chrootsh' instead of
> 'bash' could solve my problem, but it did not really work for me.
what was in the logs? jk_chrootsh usually gives useful log messages.
>
> I realized I do not really understand how jk_chrootsh works. Can somebody
> help me with this ?
jk_chrootsh is a login shell replacement, perhaps jk_uchroot works
better for your situation.
Olivier
--
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/