downer has asked for the wisdom of the Perl Monks concerning the following question:
the error message I get is as follows:#!/usr/local/bin/perl -w use strict; use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser carpout); $| = 1; print header(-type => 'text/html'), start_html(); my $path = '/var/www/cgi-bin/samples'; print "hi"; undef $/; opendir DIR, $path or die "cant open dir $!"; my @parts = sort(readdir(DIR)); foreach my $x (@parts) { open FILE, $path."/".$x or die "cant open $x $!"; my $data = ''; $data = <FILE>; print $data; close FILE; system("date"); sleep(5); }
I have given a+rw permission to all the files associated, and a+rwx permission to the directory "samples" and all parent directories in the file system tree. I'm clueless. help me monks, you're my only hope.Software error: cant open dir Permission denied at /var/www/cgi-bin/test3.cgi line 15.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Troubles with CGI
by moritz (Cardinal) on Feb 05, 2008 at 14:22 UTC | |
by downer (Monk) on Feb 05, 2008 at 14:42 UTC | |
by dsheroh (Monsignor) on Feb 05, 2008 at 18:08 UTC |