Other files use S_IWUSR instead of S_IWRITE, so use S_IWUSR and S_IRUSR.