aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/stream.c4
-rw-r--r--src/indexamajig.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c
index a0d849a8..fa893a30 100644
--- a/libcrystfel/src/stream.c
+++ b/libcrystfel/src/stream.c
@@ -863,12 +863,12 @@ Stream *open_stream_fd_for_write(int fd)
}
-
Stream *open_stream_for_write(const char *filename)
{
int fd;
- fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR);
+ fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if ( fd == -1 ) {
ERROR("Failed to open stream.\n");
return NULL;
diff --git a/src/indexamajig.c b/src/indexamajig.c
index 143a0d82..9102ccc5 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -627,7 +627,8 @@ int main(int argc, char *argv[])
}
- ofd = open(outfile, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR);
+ ofd = open(outfile, O_CREAT | O_TRUNC | O_WRONLY,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if ( ofd == -1 ) {
ERROR("Failed to open stream '%s'\n", outfile);
return 1;