I have an annoying and strange problem.
I am trying to copy a file using perl, from one directory to another. The script taht does this is called from my webserver, when a user clicks a button.
Now, the target directory has the correct permissions (755), the source file has the correct permissions (755) but when I copy the file, the permissions on the file are being reset to -rw-r--r--, ie I have no execute permissions on the new file.
The file is being copied correctly, but the permissions are being reset! Argh!
chmod $FMODE, '$galleryName/gallery.cgi';
where $FMODE is 0755, and I am uisng the File:Copy; function.