[#8127] set right perms for file, with atomic ops
2 files changed