CGI

Apache, Lighttpd, nginx, Cherokee
Post Reply
claus
Posts: 8
Joined: 2003-06-15 19:20
 

CGI

Post by claus »

Hallo!

Ich habe bereits die Suchfunktion benutzt, vieles über cgiprobs gefunden aber bisher keine antwort auf meines gesehen.
Also ich habe Suse und confixx2
Wenn ich jetzt in /home/web1/cgi-bin/
ein cgi ausführen will kommt immer:

Code: Select all

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@it-medium.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
in der suexec.log steht:

Code: Select all

[2003-06-15 14:37:48]: info: (target/actual) uid: (web1/web1) gid: (ftponly/ftponly) cmd: sysinfo.cgi
[2003-06-15 14:37:48]: error: file has no execute permission: (/home/www/web1/html/cgi-bin/sysinfo.cgi)
in der error_log:

Code: Select all

[Sun Jun 15 19:14:55 2003] [error] [client 217.233.82.117] Premature end of script headers: /home/www/web1/html/cgi-bin/sysinfo.cgi
Dateirechte habe ich auch gesetzt.

in der httpd.conf steht noch am ende:

Code: Select all

  ScriptAlias /cgi-bin/ /home/www/confixx/html/cgi-bin/
Ich weiss nicht ob, wenn ich das ändere dann confixx noch funzt...

Wäre für Hilfe sehr dankbar!
Es muss doch einen weg geben, damit überall automatisch cgi im cgi-bin verzeichnis geht :)
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
Contact:
 

Re: CGI

Post by dodolin »

[2003-06-15 14:37:48]: error: file has no execute permission: (/home/www/web1/html/cgi-bin/sysinfo.cgi)
Steht doch alles da?!
Also

Code: Select all

chmod u+x /home/www/web1/html/cgi-bin/sysinfo.cgi
und gut ist. :)
claus
Posts: 8
Joined: 2003-06-15 19:20
 

bringt nichts...

Post by claus »

Habe ich gemacht bringt nichts kommt wieder "Internal Server Error"
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
Contact:
 

Re: CGI

Post by dodolin »

Habe ich gemacht bringt nichts kommt wieder "Internal Server Error"
Jetzt müsste aber der suexec.log anders aussehen!
[2003-06-15 14:37:48]: info: (target/actual) uid: (web1/web1) gid: (ftponly/ftponly) cmd: sysinfo.cgi
Hatte ich übersehen. Also noch

Code: Select all

chown web1. sysinfo.cgi
machen. Und wenn's nicht geht, bitte logs liefern...
claus
Posts: 8
Joined: 2003-06-15 19:20
 

Re: CGI

Post by claus »

suexec.log:

Code: Select all

[2003-06-15 21:19:00]: info: (target/actual) uid: (web1/web1) gid: (ftponly/ftponly) cmd: sysinfo.cgi
[2003-06-15 21:19:00]: error: directory is writable by others: (/home/www/web1/html/cgi-bin)
error_log:

Code: Select all

[Sun Jun 15 21:19:00 2003] [error] [client 217.233.82.117] Premature end of script headers: /home/www/web1/html/cgi-bin/sysinfo.cgi
bin net so der profi. des hat aba nix gebracht.
und es kann doch net sein, dass man bei jeder datei da son aufwand machen muss. ich meine wenn mehrere leute auf dem server cgis wollen is des n bisschen umständlich, dass ich da immer extra was machen muss...
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
Contact:
 

Re: CGI

Post by dodolin »

claus
Posts: 8
Joined: 2003-06-15 19:20
 

Re: CGI

Post by claus »

hmm was soll ich damit?
dodolin
Posts: 3840
Joined: 2003-01-21 01:59
Location: Sinsheim/Karlsruhe
Contact:
 

Re: CGI

Post by dodolin »

Lesen?!

... und verstehen.

Punkt 14. Sagt aber auch dein suexec.log. Und dein User (chown... - s.o.) stimmt immer noch nicht.
claus
Posts: 8
Joined: 2003-06-15 19:20
 

Re: CGI

Post by claus »

also ich hab jetzt mal n bisschen rumgeguckt und ich glaube des liegt an der einstellung in der httpd.conf

Code: Select all

  DocumentRoot /home/www/confixx/html
  php_admin_value safe_mode_exec_dir /home/www/confixx/bin
  php_admin_value upload_tmp_dir /home/www/confixx/tmp
 ScriptAlias /cgi-bin/ /home/www/confixx/html/cgi-bin/
</VirtualHost>
Ich hab des sysinfo.cgi mal in das verzeichnis /home/www/confixx/html/cgi-bin geladen und da gings ohne weiteres!

Kann man des mit scriptalias nicht irgendwie so machen, dass des bei allen /cgi-bin geht?
alexander newald
Posts: 1117
Joined: 2002-09-27 00:54
Location: Hannover
Contact:
 

Re: CGI

Post by alexander newald »

Hi,

du hast die Rechte für das Skript nicht richtig gesetzt:

chmod a-rwx deinskript
chmod u+rwx deinskript
chmod o+rx deinskript

kann man auch mir den Zahlen machen, aber so sieht man was es soll.

Alexander Newald
claus
Posts: 8
Joined: 2003-06-15 19:20
 

Re: CGI

Post by claus »

Nein an den Rechten liegt es nicht :)
alexander newald
Posts: 1117
Joined: 2002-09-27 00:54
Location: Hannover
Contact:
 

Re: CGI

Post by alexander newald »

Was sagt suexec log und error log?

Alexander Newald
claus
Posts: 8
Joined: 2003-06-15 19:20
 

Re: CGI

Post by claus »

Siehe weiter oben...
aber es liegt 100%ig an der httpd.conf, weils in dem /home/www/confixx/html/cgi-bin ja geht!!
alexander newald
Posts: 1117
Joined: 2002-09-27 00:54
Location: Hannover
Contact:
 

Re: CGI

Post by alexander newald »

Ã?h, und wie sieht der vhost Abschnitt aus? Poste nochmal die aktuellen Logfiles.
claus
Posts: 8
Joined: 2003-06-15 19:20
 

Re: CGI

Post by claus »

steht alles ein paar posts weiter oben
alexander newald
Posts: 1117
Joined: 2002-09-27 00:54
Location: Hannover
Contact:
 

Re: CGI

Post by alexander newald »

Ã?h, nö, die aktuellen Logfiles stehen da ja nicht, aber egal... wenn du nicht geben Logfile, dann ich nicht helfen... (Manchmal ist es nur eine Kleinigkeit die anders ist, aber auch entscheidend)

Alexander Newald
Matthias Diehl
Posts: 315
Joined: 2002-09-24 13:26
 

Re: CGI

Post by Matthias Diehl »

Die Verzeichnisrechte stimmen nicht !

Code: Select all

[2003-06-15 21:19:00]: error: directory is writable by others: (/home/www/web1/html/cgi-bin)
sagt es Dir doch
Post Reply