Revert "security: avoid race between file creation and chmod(2)"

This reverts commit cf0f1c981c551ad3d0c0b17a9313c255f3a49a28.
Merge pull request #10555 from s0undt3ch/develop

Revert "security: avoid race between file creation and chmod(2)"