summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-05-14 12:45:04 +0200
committerantirez <antirez@gmail.com>2013-05-14 12:45:04 +0200
commit9e74d216e1385dd7d45880b14c12100599e38cfb (patch)
tree3937926927b26b486b8f5abc6c22925acd0de837
parente252045454bfa90cd5c9d937e249821969c7425f (diff)
downloadredis-9e74d216e1385dd7d45880b14c12100599e38cfb.tar.gz
CONFIG REWRITE: Use sane perms when creating redis.conf from scratch.
-rw-r--r--src/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 27fee376e..5c9f5d92e 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1481,7 +1481,7 @@ void rewriteConfigRemoveOrphaned(struct rewriteConfigState *state) {
* set accordingly. */
int rewriteConfigOverwriteFile(char *configfile, sds content) {
int retval = 0;
- int fd = open(configfile,O_RDWR|O_CREAT);
+ int fd = open(configfile,O_RDWR|O_CREAT,0644);
int content_size = sdslen(content), padding = 0;
struct stat sb;
sds content_padded;