From 9ab8a423404fa3ed4f1a7ae9f8200f8f43b9e7a6 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Mon, 21 Sep 2015 15:48:02 +0200 Subject: [PATCH] fixed the mkdir permission mode that forced the user to use sudo to write in the created directories --- src/obidms.c | 2 +- src/obidmscolumndir.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/obidms.c b/src/obidms.c index b025a44..595dfa5 100644 --- a/src/obidms.c +++ b/src/obidms.c @@ -121,7 +121,7 @@ OBIDMS_p obi_create_dms(const char* dms_name) return NULL; // Try to create the directory - if (mkdir(directory_name, 0x777) < 0) + if (mkdir(directory_name, 00777) < 0) { if (errno == EEXIST) obi_set_errno(OBIDMS_EXIST_ERROR); diff --git a/src/obidmscolumndir.c b/src/obidmscolumndir.c index 6f7dcd0..6a347e2 100644 --- a/src/obidmscolumndir.c +++ b/src/obidmscolumndir.c @@ -165,7 +165,7 @@ OBIDMS_column_directory_p obi_create_column_directory(OBIDMS_p dms, const char* } // Try to create the directory - if (mkdirat(dms_file_descriptor, column_directory_name, 0x777) < 0) + if (mkdirat(dms_file_descriptor, column_directory_name, 00777) < 0) { if (errno == EEXIST) obi_set_errno(OBICOLDIR_EXIST_ERROR);