Why on earth was I creating the data file with x permission? Silly
[sgt/agedu] / agedu.c
diff --git a/agedu.c b/agedu.c
index 533dc4c..76e884c 100644 (file)
--- a/agedu.c
+++ b/agedu.c
@@ -887,7 +887,8 @@ int main(int argc, char **argv)
                /*
                 * Prepare to write out the index file.
                 */
-               fd = open(filename, O_RDWR | O_TRUNC | O_CREAT, S_IRWXU);
+               fd = open(filename, O_RDWR | O_TRUNC | O_CREAT,
+                         S_IRUSR | S_IWUSR);
                if (fd < 0) {
                    fprintf(stderr, "%s: %s: open: %s\n", PNAME, filename,
                            strerror(errno));