It looks like (so far) the best way to do this is to do all your work on a tempfile ( I like File::Temp myself) version of the file you want to copy and then do your chmod and/or chown on the tempfile and then use rename(). This seems to work correctly.