aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/directory.c2
-rw-r--r--src/state_file.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/directory.c b/src/directory.c
index 06a39d7bf..c07f9edcb 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -1042,7 +1042,7 @@ int writeDirectoryDB(void)
DEBUG("writing DB\n");
- while (((fd = open(dbFile, O_WRONLY|O_TRUNC|O_CREAT)) < 0) &&
+ while (((fd = open(dbFile, O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) &&
errno == EINTR);
if (fd < 0) {
ERROR("unable to write to db file \"%s\": %s\n",
diff --git a/src/state_file.c b/src/state_file.c
index b7f28e538..365baec0f 100644
--- a/src/state_file.c
+++ b/src/state_file.c
@@ -55,7 +55,7 @@ void write_state_file(void)
if (!sfpath)
return;
- while (((fd = open(sfpath, O_WRONLY|O_TRUNC|O_CREAT)) < 0) &&
+ while (((fd = open(sfpath, O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) &&
errno == EINTR);
if (fd < 0) {
ERROR("problems opening state file \"%s\" for writing: %s\n",