Keep file permissions when replacing existing file
BUG: 40139 FIXED-IN: 5.0.4
Differential Revision: https://phabricator.kde.org/D20646