https://github.com/RoboTux approved this pull request. I had no idea cp tried to keep the same permission. Since this is a workaround I'll give some time for people to reply if they have a better (portable) idea. https://github.com/llvm/llvm-project/pull/121377