|
Hi,
Loved the article, but can't seem to create a file in my CGI-Executables folder. The following script should make a new file when it trys to open it (as it, the file trying to be opened, does not exist):
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "The contents of the file:
";
my $newtext = "newtext from old";
open (USER,"> example.txt");
flock (USER, 2);
print USER $newtext;
close USER;
exit;
But no file is created. Perl should automatically create the file it can't find when you try and open a file to write to. The error log says I don't have permissions to write to this directory. Permissions are set to 775. Isn't that enough? My other host has the permissions set to 755 and I have no problems there. Anyone have any ideas?
Mark
|