Perl won't write to or create external files.
G'day,
Just wondering if anyone has experienced this problem, and if so, they know how to resolve said problem.
I'm currently writing a program, which one part of it needs to write data to an external data file. Generally that would be no problem, I've done it thousands of times. The code I'm using is such:
open(EML,">data/test.eml");
print EML "whatever...";
close(EML);
Whether or not the test.eml file exists makes no difference, and the permissions are all correct, I've even tried overkilling the permissions with:
chown nobody.nobody data
chmod 777 data
However, this makes no difference, the server just plain refuses to allow this to happen. This is all running on a Fedora Core 3 version of Linux, which shouldn't make a difference. But if I do the exact same thing on my Red Hat 9 Box it works perfectly.
I can read external files on the FC3 Box, just not write them. I have thrown this into a perl script to check the write access:
if (-w "data/test.eml") {
print "file writeable";
}
With a file in place of course.
I've been through the /etc/httpd/conf/httpd.conf file on both systems, and checked the configuration for CGI related options, and they where already identical.
Does anyone know of a reason this may be happening?
|