From 9e74d216e1385dd7d45880b14c12100599e38cfb Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 14 May 2013 12:45:04 +0200 Subject: [PATCH] CONFIG REWRITE: Use sane perms when creating redis.conf from scratch. --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;