FS-10457: [mod_cdr_csv] set group too when creating new csv file so other users in the group can access it

This commit is contained in:
Mike Jerris 2017-06-30 17:44:05 -04:00
parent c7de29c16d
commit 9600fdd1d6
1 changed files with 4 additions and 0 deletions

View File

@ -81,7 +81,11 @@ static void do_reopen(cdr_fd_t *fd)
}
for (x = 0; x < 10; x++) {
#ifdef _MSC_VER
if ((fd->fd = open(fd->path, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR)) > -1) {
#else
if ((fd->fd = open(fd->path, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) > -1) {
#endif
fd->bytes = fd_size(fd->fd);
break;
}