Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2001 13:44:35 +0800
From:      "louie miranda" <mirandaj@team.ph.inter.net>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: One CGI script won't run - permission problemss??
Message-ID:  <004b01c156ce$cd7f2c80$e458a8c0@ph.inter.net>
References:  <3.0.6.32.20011016205814.007ab100@earthlink.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, i have encounter that problem before..
what i did is i recode it again but in my UNIX machine..

when, i transfer my file win to unix / when i run it, the apache error logs
says, not/found.
so what i did is i run it on the console

./myperl

not/found again..

so i ask on irc, and they told me to copy n paste it to win to unix, not in
ftp binary/ascii

and then i did run it again

and it work..

hope this help..




louie miranda (axishift.ath.cx)
------------------------------------------
Security Is A Series Of Well-Defined Steps

chmod -R 0 / ; and smile :)



----- Original Message -----
From: "Cherie&John Carri" <cjcarri@earthlink.net>
To: <questions@FreeBSD.ORG>
Cc: <cjcarri@earthlink.net>
Sent: Wednesday, October 17, 2001 11:58 AM
Subject: One CGI script won't run - permission problemss??


> Hi all,
>   I have a 200 MHz Pentium PC running FreeBSD 4.2. It's set up with Apache
> and Perl, for use as a web server on a small intranet at work.
>
>   I have several Perl scripts in the cgi-bin directory, but ONE of them
> won't work as it should, and I've run out of ideas to try. Here are the
> details:
>
>  1)All the CGI scripts have temporarily been set with chmod a+x
>  2)All the CGI scripts have the identical #!/usr/bin/perl first line
>  3)All the CGI scripts run without errors when I execute them directly
with
> Perl ("perl scriptname") in the /cgi-bin directory
>
> However, ONE script, nutest1.pl, won't run when the browser calls it. The
> browser (Netscape 4.x, came with my FreeBSD 4.2 set) shows "500 internal
> server error" in the top status bar, and "The server encountered an
> internal error or misconfiguration and was unable to complete your
request"
> in the main window.
>
> I checked /var/log/httpd-error.log, and found the messages "No such file
or
> directory: exec of /usr/local/www/cgi-bin/nutest1.pl failed" and
"Premature
> end of script headers usr/local/www/cgi-bin/nutest1.pl"
>
> For the record, "ls -l /usr/local/www/cgi-bin" shows lrwxr-xr-x as the
> permissions for this directory.
>
> Okay, Apache can't find or run this file, but WHY? It's in the same
> directory as the other scripts that do work, the permissions are set the
> same as the other scripts (to -rwxr-xr-x), and I can run it directly with
> Perl with no errors. What could possibly be wrong here?
>
>  The only thing different about this one script that won't run is that:
> (A)It was developed on a Windows machine (where it ran fine!), and was
then
> ported over to my FreeBSD box by changing the shebang line to
> #!/usr/bin/perl, the location of Perl on the FreeBSD box.
>
> (B)It opens a file and reads in data during execution. The data file has
> temporarily been set to permissions -rwxrwxrwx, but I don't think this is
> my problem as the script in question doesn't even start.
>
> Any ideas? I keep wondering if there is still some setting with file
> permissions in FreeBSD that I am unaware of.
>
> Any and all help appreciated. I'm trying to get this script to work by
> tomorrow, so it might be a long night!
>
> TIA,
> -John Carri
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004b01c156ce$cd7f2c80$e458a8c0>