Creating files on apache w/perl

Raptur

Registered
I'm sure this has one of those simple and obvious solutions that I should have seen, but I've searched the forums and haven't really found anything. I have a cgi-perl script with the line

open(NEWENTRY,">$dirPath$fileName") or die("Error: $!");

Essentially, I want to create the file $fileName in the directory pointed to by $dirPath. When I run it from the terminal, everything works fine (with the obvious exception of the form variables). A file is created in the expected place with blank form variables, and this file has all the data expected with blank form variables. When run from the server through a browser, however, execution stops at this line. print commands etc. work immediately before it, and do not work immediately after it. I'm assuming it has something to do with permissions and the webserver; the script is chmod a+x

Any ideas?

Thanks in advance.

-=-raptur-=-
 
Apache runs as user www in group www. If the destination directory isn't either world-writeable or writeable by user www or group www then the open will fail.
 
Back
Top