Thanks for the input, but it still doesn't work. I did manage to find an alternative solution. Turns out that my company's windows machines have the chmod command (would've been nice to know that earlier). Using that in combination with File::copy works in every case.