According to POSIX open needs a third argument if O_CREAT is specified: > O_CREAT If the file exists, this flag has no effect. > Otherwise, the file shall be created; [...] and the access > permission bits (see <sys/stat.h>) of the file mode shall > be set to the value of the argument following the oflag > argument taken as type mode_t modified as follows [...] Signed-off-by: Christian Mauderer <christian.mauderer@xxxxxxxxxxxxxxxxxx> --- scripts/bareboximd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bareboximd.c b/scripts/bareboximd.c index e5000e0ae..b332d435a 100644 --- a/scripts/bareboximd.c +++ b/scripts/bareboximd.c @@ -59,7 +59,7 @@ static int write_file(const char *filename, const void *buf, size_t size) int fd, ret; int now; - fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT); + fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (fd < 0) return fd; -- 2.26.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox