Re: cgi with chroot

2006-06-14 Thread John Draper
You wrote: The error message you get Premature end of script headers means that the HTTP header generated by your CGI is not correct. You need at least to tell the webserver what content type your CGI generates before sending any further data. For example in a sh script: #!/bin/sh echo

Re: cgi with chroot

2006-05-31 Thread Aiko Barz
On Tue, 2006-05-30 at 15:34 -0700, prad wrote: i tried to got a ksh script to work after i copied the ksh into /var/www/bin my understanding is that the chrooted environment doesn't give access to the /bin/ksh program. /var/www/bin/sh is working for me. i tried the same thing with ruby

Re: cgi with chroot

2006-05-31 Thread Adam
On Wed, 31 May 2006 06:58:51 +0200 Marcus Glocker [EMAIL PROTECTED] wrote: On Wed, May 31, 2006 at 12:38:10AM -0400, Adam wrote: #!/bin/sh echo Content-Type: text/html echo echo I'm sorry Dave, I'm afraid I can't do that. HTTP headers are terminated by \r\n not \n.

Re: cgi with chroot

2006-05-31 Thread Marcus Glocker
On Wed, May 31, 2006 at 12:07:16PM -0400, Adam wrote: I know that example generates \n instead of \r\n, that's why I said its wrong. Just because apache will fix your incorrect output, doesn't mean you should go ahead and write CGIs that way and rely on webservers to fix it for you. Not all

Re: cgi with chroot

2006-05-31 Thread prad
On Wednesday 31 May 2006 00:20, Aiko Barz wrote: Ruby is working for me too. Check this out: the script is great, aiko and has helped my understanding a lot (i'm trying to learn ksh as well and it was nice to see a script like this in action!) (also thanks to marcus (and others) for the

cgi with chroot

2006-05-30 Thread prad
i'm using php right now and things are fine. however, after reading various threads on the (recommended by several people here) MARC (http://marc.theaimsgroup.com/?l=openbsd-misc) list, i was curious about learning some new things like: cgi fastcgi lighttpd ruby which came up in the

Re: cgi with chroot

2006-05-30 Thread Jacob Yocom-Piatt
Original message Date: Tue, 30 May 2006 15:34:00 -0700 From: prad [EMAIL PROTECTED] Subject: cgi with chroot To: misc@openbsd.org i'm using php right now and things are fine. however, after reading various threads on the (recommended by several people here) MARC (http

Re: cgi with chroot

2006-05-30 Thread prad
On Tuesday 30 May 2006 16:09, Jacob Yocom-Piatt wrote: Original message man ldd. it will tell you which, if any, dynamic libraries you need in your chroot. thank jacob. it certainly seems like a good idea! ldd /usr/local/bin/ruby gave StartEnd Type Open Ref GrpRef

Re: cgi with chroot

2006-05-30 Thread Adam
On Tue, 30 May 2006 17:20:30 -0700 prad [EMAIL PROTECTED] wrote: i have mod_ruby and the appropriate changes in the httpd.conf file. You are going to need to copy the entire ruby module directory. I think that that is all you will need, since the other libs should be loaded when mod_ruby is

Re: cgi with chroot

2006-05-30 Thread Adam
On Tue, 30 May 2006 15:34:00 -0700 prad [EMAIL PROTECTED] wrote: (also, lighttpd looks really neat and clean, but i don't think it runs chrooted by default, right? (it's .conf file is in /etc) so to get it to do that would require understanding just what the chrooted process involves,

Re: cgi with chroot

2006-05-30 Thread Marcus Glocker
On Tue, May 30, 2006 at 03:34:00PM -0700, prad wrote: i'm using php right now and things are fine. however, after reading various threads on the (recommended by several people here) MARC (http://marc.theaimsgroup.com/?l=openbsd-misc) list, i was curious about learning some new things like:

Re: cgi with chroot

2006-05-30 Thread Marcus Glocker
On Wed, May 31, 2006 at 06:10:13AM +0200, Marcus Glocker wrote: Hello prad, Of course if you run a webserver chrooted you have to care that all library and stuff a program (in that case a CGI) needs, are accessibly withing the chrooted environment. But you already got that tip. The

Re: cgi with chroot

2006-05-30 Thread Adam
On Wed, 31 May 2006 06:13:12 +0200 Marcus Glocker [EMAIL PROTECTED] wrote: #!/bin/sh echo Content-Type: text/html echo echo I'm sorry Dave, I'm afraid I can't do that. HTTP headers are terminated by \r\n not \n. Adam

Re: cgi with chroot

2006-05-30 Thread Marcus Glocker
On Wed, May 31, 2006 at 12:38:10AM -0400, Adam wrote: #!/bin/sh echo Content-Type: text/html echo echo I'm sorry Dave, I'm afraid I can't do that. HTTP headers are terminated by \r\n not \n. Yes, correctly HTTP headers are terminated by \r\n. But most webservers also