Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -29,10 +29,12 @@ #ifndef O_BINARY # define O_BINARY 0 #endif +#define DEFAULT_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH + OFFile *of_stdin = nil; OFFile *of_stdout = nil; OFFile *of_stderr = nil; static int parse_mode(const char *mode) @@ -197,11 +199,11 @@ [super dealloc]; @throw [OFInvalidArgumentException newWithClass: c selector: _cmd]; } - if ((fd = open([path cString], flags)) == -1) { + if ((fd = open([path cString], flags, DEFAULT_MODE)) == -1) { c = isa; [super dealloc]; @throw [OFOpenFileFailedException newWithClass: c path: path mode: mode];