Subject: Re: Chroot & cgi Help!

From: "Fred B. Ringel" <[email-masked]>
Date: Tue, 1 Apr 1997 08:03:38 -0500 (EST)

On Mon, 31 Mar 1997, Michael Brennen wrote:
Hi Michael--

>Did you ever get an answer on this?
>
	Yes. I had to hack the sources (util.c) to ignore the "/./" and
"/../" in the path.

>Sounds like a source hack is in order on cgi-wrap to get it to swallow the
>/./ in the /etc/passwd home path.
>
	Yep. Exactly

>Yet, something is still not adding up as I understand your description so
>far. When you chroot the user in ftp to upload the CGI stuff, the CGI is
>not executed at that time.  The cgi-wrap is executed later from the Web
>server, no?  What does a chrooted ftp session have to do with Web server
>CGI?  Are they running the CGI programs from the ftp login? 
>
	No, its not that the cgi's are executed when the chroot takes
place, but, since cgiwrap derrives its paths from the home dir indicated in
/etc/passwd, it was translating the path to the cgi to be something like
this;

	/home/joeuser/./public_html/cgi-bin/sample.pl, , an illegal
path which casued the cgiwrap error, instead of

	/home/joeuser/public_html/cgi-cin/sample.pl

	Now I have the same problem, even after the hack, with my virtual
domains (also chrooted) that have this path translation problem. I've
posted to the cgiwrap list concerning that one, but its not resolved yet.

	Fred
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Fred B. Ringel			--	Rivertown.Net Internet Access
Systems Administrator		--	http://www.rivertown.net
and General Fixer Upper		--	Voice/Fax/Support: +1.914.478.2885
	Although in theory, there's no difference between 
	theory and practice, in practice, there is.