--- app_voicemail.c +++ app_voicemail.c 2006-04-24 13:26:37.000000000 -0700 @@ -901,7 +901,7 @@ SQLFreeHandle (SQL_HANDLE_STMT, stmt); goto yuck; } - fd = open(full_fn, O_RDWR | O_CREAT | O_TRUNC); + fd = open(full_fn, O_RDWR | O_CREAT | O_TRUNC, VOICEMAIL_FILE_MODE ); if (fd < 0) { ast_log(LOG_WARNING, "Failed to write '%s': %s\n", full_fn, strerror(errno)); SQLFreeHandle (SQL_HANDLE_STMT, stmt); @@ -1228,7 +1228,7 @@ snprintf(full_fn, sizeof(full_fn), "%s.txt", fn); cfg = ast_config_load(full_fn); snprintf(full_fn, sizeof(full_fn), "%s.%s", fn, fmt); - fd = open(full_fn, O_RDWR); + fd = open(full_fn, O_RDWR, VOICEMAIL_FILE_MODE); if (fd < 0) { ast_log(LOG_WARNING, "Open of sound file '%s' failed: %s\n", full_fn, strerror(errno)); goto yuck;