Stefan Klingner schreef:
> hi @all,
>
> thanks for the answers.
>
> from phpinfo()...
>
> open_basedir = no value
> safe_mode = off
>
> result of passthru('echo $PATH'); -> NOTHING
>
It is very unlikely that this will give no result at all.
Please try:
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$ret = shell_exec('echo x:$PATH:x');
var_dump($ret);
$ret = shell_exec('/bin/ls /');
var_dump($ret);
?>
By the way: Are you testing chroot inside jails ? That sounds oversecured ;)
Is there any interest in peruser-jail support ? If so I will take a look
at it.
-- Jille
> how do you have created your jails? which tools do you used? have someone
> experience with jailkit. it looks like a really powerfull tool and it is
> maintained very well.
>
> i used jailkit...
>
> jk_init -j /home/user basicshell
> jk_jailuser user
>
> please help me getting this stuff working because i want to write the
> chroot tutorial for peruser. :)
>
> On Thu, 08 Oct 2009 23:02:21 +0200, Leen Besselink
> <[email protected]>
> wrote:
>
>> Jille Timmermans wrote:
>>
>>> Stefan Klingner schreef:
>>>
>>>> i try to run a command like "ls /" from a php script inside a jail.
>>>>
> the
>
>>>> jail was created with jailkit and contain the tool + all required
>>>> libaries. if i write exec("ls /"); in a php script, it returns
>>>>
> nothing.
>
>>>> have someone an idea? possibly the processor do not have the path or
>>>>
> do
>
>>>> not know how to find the executable?
>>>>
>>>>
>>>>
>>> Would you please try:
>>>
>>> passthru('echo $PATH'); // output should contain /bin; if not: the
>>>
> shell
>
>>> interpreter can not find 'ls'; and you have to specify it as '/bin/ls'.
>>> passthru('ls -l /bin/sh'); // might give info about executability
>>>
>>> And of course check whether safe-mode is off ;)
>>>
>>>
>> And possibly: open_basedir ?
>>
>>
>>> -- Jille
>>> _______________________________________________
>>> Peruser mailing list
>>> [email protected]
>>> http://www.telana.com/mailman/listinfo/peruser
>>>
>>>
>> _______________________________________________
>> Peruser mailing list
>> [email protected]
>> http://www.telana.com/mailman/listinfo/peruser
>>
> _______________________________________________
> Peruser mailing list
> [email protected]
> http://www.telana.com/mailman/listinfo/peruser
>
_______________________________________________
Peruser mailing list
[email protected]
http://www.telana.com/mailman/listinfo/peruser