8c114f
diff --git a/sed/utils.c b/sed/utils.c
8c114f
index 4028d98..2e74654 100644
8c114f
--- a/sed/utils.c
8c114f
+++ b/sed/utils.c
8c114f
@@ -181,7 +181,7 @@ ck_mkstemp (char **p_filename, const char *tmpdir,
8c114f
    /* The ownership might change, so omit some permissions at first
8c114f
       so unauthorized users cannot nip in before the file is ready.
8c114f
       mkstemp forces O_BINARY on cygwin, so use mkostemp instead.  */
8c114f
-  mode_t save_umask = umask (0700);
8c114f
+  mode_t save_umask = umask (0077);
8c114f
   int fd = mkostemp (template, 0);
8c114f
   umask (save_umask);
8c114f
   if (fd == -1)