Most web servers run as a user other than root for security reasons. Thus, if the directory is owned by root, and does not have "others" read/write access, there will be no way for your CGI (which is run as the same user as the http process) to save things to this directory. Adding "others" read/write access, however, is a bigger can of worms particularly on a shared machine, so don't do this. Either make the http user the owner of these directories (either directly, or via a group) or have the data directory outside of the CGI directory but where you can control the owners and permissions. Also, make sure that you are catching all potental file errors with
die $! as this will tell you in depth what is going wrong.
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain