aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-05-22 14:33:51 +0200
committerThomas White <taw@physics.org>2014-05-22 14:33:51 +0200
commit8c76ffc087dc1f900125b8669d3460b7ea52f14c (patch)
tree2158ff00a46c224e8a1389ee1f7a0b874d169470 /libcrystfel
parent947fb90facb9afd6b5bbc1e7762644c073955a71 (diff)
Fix permissions of newly created stream files
The user's umask should prevent all the streams from being (eg) world writable.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/stream.c4
1 files changed, 2 insertions, 2 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;