This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Apache CGI Scripts - Network layer permission denied


When I run CGI scripts from Apache I'm getting permission denied errors.

use Net::protoent;
my $p = getprotobyname(shift || 'tcp');

if (defined $p) {
 printf("proto for %s is %d, aliases are %s\n",
          $p->name, $p->proto, "@{$p->aliases}");
} else {
 printf("Bad protocol 'tcp'\n");
}

This correctly turns ths string 'tcp' into the number 6 via lookup in
/etc/protocols when run from the pdksh prompt. Returns the bad protocol
error when run as a CGI script from Apache. Apache is being started (by
apachectl start) from the same shell prompt which correctly runs the script.
In general I'm finding that all network related calls (creating new sockets
and similar) are failing.

I also note (and think that it's related) that uname -n returns the correct
mixed case hostname when run from the shell prompt but returns an incorrect
(all upper case) string when run from the cgi-bin/test-cgi shell script.
This eliminates Perl from the equation.

I think this is the same problem as posted to this mailing list by:

Richard Morse <remorse@partners.org>
Problems with Amanda and Cygwin 1.5.10
28/07/2004

and

"David A. Rogers" darogers@speakeasy.net
Socket problem w/ apache & perl cgi
30/07/2004

I did not notice any follow up posts to these queries (my spam filter was
rejecting some Cygwin mailing list posts).

Regards

Attachment: cygcheck.out
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]