diff --git a/touch.c b/touch.c index fca2f16..74bdc27 100644 --- a/touch.c +++ b/touch.c @@ -38,7 +38,7 @@ touch(const char *file) return; } - if ((fd = open(file, O_CREAT | O_EXCL, 0644)) < 0) + if ((fd = open(file, O_WRONLY | O_CREAT | O_EXCL, 0666)) < 0) eprintf("open %s:", file); close(fd);