Fixes #5246: Remove group permissions on generated promises with chmod

Could you please check that "changePermission ! == 0" and else rise a Failure. We don't want to move the files if an error happened.