From: Mike Jerris Date: Fri, 30 Jun 2017 21:44:05 +0000 (-0400) Subject: FS-10457: [mod_cdr_csv] set group too when creating new csv file so other users in... X-Git-Tag: v1.8.0~400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9600fdd1d675af158e5c58332f8887bd31e34d27;p=thirdparty%2Ffreeswitch.git FS-10457: [mod_cdr_csv] set group too when creating new csv file so other users in the group can access it --- diff --git a/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c b/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c index 1ce494a334..20259251de 100644 --- a/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c +++ b/src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c @@ -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; }