jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jailkit-users] jk_chrootlaunch and environment variables


From: AMMOnium
Subject: [Jailkit-users] jk_chrootlaunch and environment variables
Date: Sat, 20 Feb 2010 21:48:36 +0300

Hello,

I am migrating a torrent client (rtorrent) on a headless Karmic box into chroot 
with jailkit.
Previously, rtorrent was being launched from an init script in a detached 
screen session and used via web interface, with a possibility to login with 
rtorrent's dedicated user from ssh, resume the screen session and do some 
manual adjustments if needed.

I have set up everything so I can now login via ssh into the jail and launch a 
screen session with rtorrent (I now have a working jail with bash, ssh, screen 
and rtorrent).
The problem appears if launching a screen session with rtorrent from init 
script with jk_chrootlaunch.

The command in the init script takes the form of:
   jk_chrootlaunch -p $RTPIDFILE -u $RTUSER -g $RTGROUP -j $RTJAILDIR -x 
$RTJAILDIR/usr/bin/screen -- -DmUS $SCRNAME $RTORRENT

I have discovered that such a way of invoking any process does not set its 
environment variables correctly. E.g. when I launch /bin/bash instead of 
$RTORRENT, login via ssh and resume the started session, I have the $USER 
variable in the shell set to "root" and no $HOME defined at all. 

Is this behaviour correct?

Regards, 
V.I.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]