Gosh.
This stuff is obsolete.
Please use S_IRUSR for S_IREAD and S_IWUSR for S_IWRITE