You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by th...@mail.pserve.hu on 2003/08/14 15:05:38 UTC

[users@httpd] cgi problem

Hi!

My problem is that a cgi doesnt run. Gives me error 500. Here are the
details:

its a default debian-woody,
in error_log:
[Thu Aug 14 15:01:24 2003] [error] [client xxx.xxx.xxx.xxx] Premature end
of script headers: /home/thomasix/public_html/test/test.cgi

in httpd.conf
<Directory "/home/thomasix/public_html/test">
  Options ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>

If i put the same script to the default cgi-bin directory its ok. What am
I doing wrong?

Thanks,

T



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Goofy .htaccess problem

Posted by Herb Stein <he...@herbstein.com>.
> -----Original Message-----
> From: Andre Malo [mailto:nd@perlig.de]
> Sent: Thursday, August 14, 2003 3:30 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Goofy .htaccess problem
>
>
> * Herb Stein wrote:
>
> > I have a client who wants to let anybody enter a random
> > userid and a specific passwd. This was not clear in the
> > FM. I'm sure it's simple.
>
> Not that simple :) mod_auth_anon provides for fixed user ids and random
> passwords. If that'd be ok for him, he can just use it.


I don't have mod__auth_anon built in, but I'm not sure that's
the answer either. I'll play with it.

> Other way 'round isn't built in. You may try something with mod_auth_any
> (http://www.itlab.musc.edu/webNIS/mod_auth_any.html)
>
> nd
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
--
Herb Stein
The Herb Stein Group
www.herbstein.com
herb@herbstein.com
314 952-4601



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Goofy .htaccess problem

Posted by André Malo <nd...@perlig.de>.
* Herb Stein wrote:

> I have a client who wants to let anybody enter a random
> userid and a specific passwd. This was not clear in the
> FM. I'm sure it's simple.

Not that simple :) mod_auth_anon provides for fixed user ids and random
passwords. If that'd be ok for him, he can just use it.

Other way 'round isn't built in. You may try something with mod_auth_any
(http://www.itlab.musc.edu/webNIS/mod_auth_any.html)

nd

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Goofy .htaccess problem

Posted by Jonathan Hilgeman <jh...@red-tea-rooibos.com>.
If you have PHP installed, you can use it in place of an .htaccess to create
a pop-up and you can program it to do whatever you want - even log all the
attempts into a specific location, or maybe send "real" users one place and
all others to another fake logged in place. There's a lot of fun
possibilities. Here's a really over-detailed tutorial on how to do it,
although you could probably skip to the end to get the code if you don't
want to learn about how it works:

http://www.zend.com/zend/tut/authentication.php

- Jonathan

----- Original Message ----- 
From: "Herb Stein" <he...@herbstein.com>
To: <us...@httpd.apache.org>
Sent: Thursday, August 14, 2003 1:13 PM
Subject: RE: [users@httpd] Goofy .htaccess problem


> I have a client who wants to let anybody enter a random
> userid and a specific passwd. This was not clear in the
> FM. I'm sure it's simple.
>
> --
> Herb Stein
> The Herb Stein Group
> www.herbstein.com
> herb@herbstein.com
> 314 952-4601
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Goofy .htaccess problem

Posted by Herb Stein <he...@herbstein.com>.
I have a client who wants to let anybody enter a random
userid and a specific passwd. This was not clear in the
FM. I'm sure it's simple. 

--
Herb Stein
The Herb Stein Group
www.herbstein.com
herb@herbstein.com
314 952-4601


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cgi problem

Posted by André Malo <nd...@perlig.de>.
* thomasix@mail.pserve.hu wrote:

> On Thu, 14 Aug 2003, [ISO-8859-1] André Malo wrote:
> 
>> You can't (except you wanna patch the code). The policy is described at
>> <http://httpd.apache.org/docs/suexec.html#model>.
> 
> Ok.
> 
>> Why don't you just adjust the gid to a valid one?
> 
> I just don't get that. How do I know what is valid?

Oh :) I thought you know that. suexec uses the uid and gid that are given in
the virtual host section by User and Group directives (assuming you have
apache httpd 1.3 running). These ids are the valid ones.

nd

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cgi problem

Posted by th...@mail.pserve.hu.

On Thu, 14 Aug 2003, [ISO-8859-1] Andr� Malo wrote:

> You can't (except you wanna patch the code). The policy is described at
> <http://httpd.apache.org/docs/suexec.html#model>.

Ok.

> Why don't you just adjust the gid to a valid one?

I just don't get that. How do I know what is valid?

T


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cgi problem

Posted by André Malo <nd...@perlig.de>.
* thomasix@mail.pserve.hu wrote:

> On Thu, 14 Aug 2003, [ISO-8859-1] André Malo wrote:
> 
>> If this is the only one, it's probably a suexec policy violation. The
>> suexec.log should provide more details.
> 
> Seems so:
> 
> [2003-08-14
> 15:28:01]: info: (target/actual) uid: (thomasix/thomasix) gid: (staff/staff)
> cmd: index.cgi
> [2003-08-14 15:28:01]: crit: cannot run as forbidden gid (50/index.cgi)
> 
> Where can I change that policy to allow it?

You can't (except you wanna patch the code). The policy is described at
<http://httpd.apache.org/docs/suexec.html#model>.

Why don't you just adjust the gid to a valid one?

nd

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cgi problem

Posted by th...@mail.pserve.hu.

On Thu, 14 Aug 2003, [ISO-8859-1] Andr� Malo wrote:

> If this is the only one, it's probably a suexec policy violation. The
> suexec.log should provide more details.

Seems so:

[2003-08-14 
15:28:01]: info: (target/actual) uid: (thomasix/thomasix) gid: (staff/staff) cmd: index.cgi
[2003-08-14 15:28:01]: crit: cannot run as forbidden gid (50/index.cgi)

Where can I change that policy to allow it?

T


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] cgi problem

Posted by André Malo <nd...@perlig.de>.
* thomasix@mail.pserve.hu wrote:

> its a default debian-woody,
> in error_log:
> [Thu Aug 14 15:01:24 2003] [error] [client xxx.xxx.xxx.xxx] Premature end
> of script headers: /home/thomasix/public_html/test/test.cgi

If this is the only one, it's probably a suexec policy violation. The
suexec.log should provide more details.

nd

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org