aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/truncate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/truncate.c b/coreutils/truncate.c
index e5fa656c8..4c997bf7a 100644
--- a/coreutils/truncate.c
+++ b/coreutils/truncate.c
@@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv)
64 64
65 argv += optind; 65 argv += optind;
66 while (*argv) { 66 while (*argv) {
67 int fd = open(*argv, flags); 67 int fd = open(*argv, flags, 0666);
68 if (fd < 0) { 68 if (fd < 0) {
69 if (errno != ENOENT || !(opts & OPT_NOCREATE)) { 69 if (errno != ENOENT || !(opts & OPT_NOCREATE)) {
70 bb_perror_msg("%s: open", *argv); 70 bb_perror_msg("%s: open", *argv);