Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 9025) +++ apps/app_voicemail.c (working copy) @@ -864,7 +864,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, 0660); if (fd < 0) { ast_log(LOG_WARNING, "Failed to write '%s': %s\n", full_fn, strerror(errno)); SQLFreeHandle (SQL_HANDLE_STMT, stmt); @@ -891,7 +891,7 @@ if (!strcasecmp(coltitle, "recording")) { res = SQLGetData(stmt, x + 1, SQL_BINARY, NULL, 0, &colsize); fdlen = colsize; - fd = open(full_fn, O_RDWR | O_TRUNC | O_CREAT, 0770); + fd = open(full_fn, O_RDWR | O_TRUNC | O_CREAT, 0660); if (fd > -1) { char tmp[1]=""; lseek(fd, fdlen - 1, SEEK_SET); @@ -1191,7 +1191,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, 0660); if (fd < 0) { ast_log(LOG_WARNING, "Open of sound file '%s' failed: %s\n", full_fn, strerror(errno)); goto yuck; @@ -1383,7 +1383,7 @@ ast_log(LOG_WARNING, "Unable to open %s in read-only mode\n", infile); return -1; } - if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, 0600)) < 0) { + if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, 0660)) < 0) { ast_log(LOG_WARNING, "Unable to open %s in write-only mode\n", outfile); close(ifd); return -1;