fixed permissions when creating files

This commit is contained in:
Celine Mercier
2015-09-22 15:52:07 +02:00
parent 72105b2aed
commit b0570ee486

View File

@ -373,7 +373,7 @@ static int create_version_file(OBIDMS_column_directory_p column_directory)
} }
// Get the file descriptor associated to the version file // Get the file descriptor associated to the version file
version_file_descriptor = openat(column_dir_file_descriptor, version_file_name, O_RDWR | O_CREAT); version_file_descriptor = openat(column_dir_file_descriptor, version_file_name, O_RDWR | O_CREAT, 0777);
if (version_file_descriptor < 0) if (version_file_descriptor < 0)
{ {
obi_set_errno(OBICOL_UNKNOWN_ERROR); obi_set_errno(OBICOL_UNKNOWN_ERROR);
@ -719,7 +719,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
} }
// Open the column file // Open the column file
column_file_descriptor = openat(column_dir_file_descriptor, column_file_name, O_RDWR | O_CREAT); column_file_descriptor = openat(column_dir_file_descriptor, column_file_name, O_RDWR | O_CREAT, 0777);
if (column_file_descriptor < 0) if (column_file_descriptor < 0)
{ {
obi_set_errno(OBICOL_UNKNOWN_ERROR); obi_set_errno(OBICOL_UNKNOWN_ERROR);
@ -1157,7 +1157,7 @@ int obi_enlarge_column(OBIDMS_column_p column)
} }
// Open the column file // Open the column file
column_file_descriptor = openat(column_dir_file_descriptor, column_file_name, O_RDWR | O_CREAT); column_file_descriptor = openat(column_dir_file_descriptor, column_file_name, O_RDWR);
if (column_file_descriptor < 0) if (column_file_descriptor < 0)
{ {
obi_set_errno(OBICOL_UNKNOWN_ERROR); obi_set_errno(OBICOL_UNKNOWN_ERROR);