unwanted UNIX file permissions after using File::Copy::syscopy
Even though my umask is set at 664, allowing both read and write access to
owner and group, a Perl script I'm developing copies files (using
File::Copy::syscopy) which then have permissions 002 - allowing only write
by others. It then attemps to modify the copied files but can't of course
because of having invalid permissions. Does a script not inherit its owner's
umask? How do I solve this problem and get the script to use my umask?
Here's my code which creates files with incorrect permissions:
File::Copy::syscopy( "../Templates/$TEMPLATE", "$filename.html" )
# requires 'use File::Copy'
or die "replace_template_strings: template not copied for
$filename.html: $!";
Brian