jailkit-users
[Top][All Lists]
Advanced

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

Re: [Jailkit-users] [Fwd: Trouble with perl program on Gentoo Linux]


From: Stephen Tallowitz
Subject: Re: [Jailkit-users] [Fwd: Trouble with perl program on Gentoo Linux]
Date: Mon, 20 Mar 2006 21:24:29 +0100

Hello John,

I like a challenge and so I've tried getting test.pl to work on my system in a 
jail. I've succeeded and this is how I did it:

jk_init /srv/jailtest/ uidbasic
jk_cp -v /srv/jailtest/ /bin/bash
# create jailuser with login shell /bin/bash, copy test.pl to users' directory 
and change test.pl permissions and mode bits
# then create a perl binary package using quickpkg from gentoolkit (gentoo 
specific) and install that package in the jail directory.
# Users of other distributions may want to consult their distributors' manuals 
to find out how to install a package to a second location in the filetree
quickpkg perl
tar -xvjf /usr/portage/packages/All/perl-5.8.7-r3.tbz2 -C /srv/jailtest/
# install different, missing libraries (see messages when trying to run 
# test.pl):
jk_cp -v /srv/jailtest/ /lib/libxyz.so.x
# install missing executables:
jk_cp -v /srv/jailtest/ /bin/dirname
jk_cp -v /srv/jailtest/ /bin/pwd
jk_cp -v /srv/jailtest/ /bin/basename
# "login" to jail and execute script
su - jailuser
./test.pl

output:
bash-3.00$ ./test.pl 
$0: ./test.pl
pgm: not_set
working_dir: not_set
$0: ./test.pl
pgm: test.pl
working_dir: /home/jailtest1

Cheers,
Stephen


On Fri, 17 Mar 2006 12:16:14 -0500
"John R Larsen" wrote:

> I'm still having the same problem, but I've tried some things in an attempt 
> to isolate the problem.  I 
> downloaded the sources for perl 5.8.8 and built it locally.  It passes all 
> the tests.  I then installed it to 
> /usr/local/bin..  Next I used tar to copy the /usr/local/bin, /usr/local/lib, 
> and /usr/local/man directories into 
> the jail.  This insures that symbolic links and files in the directory trees 
> are faithfully copied into the jail.
> 
> I still get the same errors when executing the test program in the jail.  The 
> fork call declares errors like 
> the following:
> 
> fork(Can't exec "dirname": No such file or directory at ./test.pl line 12.
> )                                  = 11246
> 
> The test program works fine when executed outside the jail.
> 
> Has anyone else solved similar problems with perl in a jail?




reply via email to

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