int fd = open("test.txt", O_WRONLY | O_CREAT | O_TRUNC);

これで作ったファイルにリードオンリー属性がつくのはなんで?