I’m using File::Copy::Recursive::dircopy( $original_dirname, $new_dirname ) or die $!; to copy a read-only directory from within a Perl script. I get a Permission denied error.
I can see that $new_dirname is created, but is marked as read only (like the original directory). Maybe this prevents from the content to be copied into it?..
Yes, this definitely seems to be a bug in
File::Copy::Recursive. A temporary work around is to set$File::Copy::Recursive::KeepModeto 0 and do thechmodyourself.It appears to have already been reported and the author is working on a fix, but it was coming “soon” on 2009-05-20 and “this weekend” on 2010-04-14.