Angel has asked for the wisdom of the Perl Monks concerning the following question:
Content-type: text/html Software error: Permission denied at validate_school_data.cgi line 307. For help, please send mail to the webmaster
#take school name and replace spaces with underlines $dir =~ s/ /_/g; mkdir( "$topdir/$dir" ,0 ) or die "Couldn't mkdir $topdir/$dir: +$!"; $mode = 0755; chmod( $mode, '$topdir/$dir'); #create redirect page for that directory my $outputpage; open(TEMPLATE, "default_redirect.html") or die "can't open redirect page"; local($/) = undef; $outputpage = <TEMPLATE>; close(TEMPLATE); $outputpage =~ s/\$name/$name/g; open( REDIRECT, ">$topdir/$dir/index.html" ) or die "$!"; print REDIRECT $outputpage; close REDIRECT; chmod $mode, '$topdir/$dir/index.html';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File permissions problems
by djantzen (Priest) on Nov 01, 2002 at 01:43 UTC | |
by tedrek (Pilgrim) on Nov 02, 2002 at 03:39 UTC |