PERL CGI - Apache chroot

MK public at kubikcz.net
Tue Jun 6 12:36:08 PDT 2006


Hello

I solved the problem by copy of file /etc/protocols. Anyway now I have 
another problem, how can I create device in chroot environment? I mean for 
example /dev/null.

I'm doing:

ls -l /dev/null
crw-rw-rw-  1 root  wheel    2,   2 Jun  6 21:28 /dev/null

$ sudo mknod /home/mk/null c 2 2
$ sudo chmod 0666 null
$ echo "xxxx" > null
sh: cannot create null: Device not configured

I tried other devices as well, for example /dev/arandom but when I want to 
access it I always get DEVICE NOT CONFIGURED.

Thanks
MK

----- Original Message ----- 
From: "Nick Guenther" <kousue at gmail.com>
To: <Openbsd-newbies at sfobug.org>; "MK" <public at kubikcz.net>
Sent: Saturday, June 03, 2006 7:26 PM
Subject: Re: PERL CGI - Apache chroot


> Hi MK,
>
> Everything that programs under a chroot need must be in the chroot
> with them. Probably the two files you listed are part of the problem
> but there may be others too.
>
> Try running tcpdump and watching for the packets (see man tcpdump for
> how to filter out uninteresting ones). This will show if it's really
> not getting sent.
>
> Then, go into the module's code and start looking for what it might
> need. Sprinkle open FH, ">>out.txt"; print FH, "debug info:"-type code
> throughout it and try to find where it's dying, if it is.
>
> -Nick 



More information about the Openbsd-newbies mailing list