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 th开发者_运维问答e 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::KeepMode
to 0 and do the chmod
yourself.
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.
精彩评论