From c9d0c8edeb6063e71935f1cbd7e09f077403cd42 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Sat, 30 Jun 2018 14:26:34 +0300 Subject: [PATCH] mdbx: create new files with mode=0640 inside mdbx_env_copy(). Change-Id: I468f0fa29d471a2e877ea20a5e61f6358347c6eb --- src/mdbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mdbx.c b/src/mdbx.c index 1ca67d75..80e049af 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -10550,7 +10550,7 @@ int __cold mdbx_env_copy(MDBX_env *env, const char *dest_path, unsigned flags) { /* The destination path must exist, but the destination file must not. * We don't want the OS to cache the writes, since the source data is * already in the OS cache. */ - int rc = mdbx_openfile(dxb_pathname, O_WRONLY | O_CREAT | O_EXCL, 0666, + int rc = mdbx_openfile(dxb_pathname, O_WRONLY | O_CREAT | O_EXCL, 0640, &newfd, true); if (rc == MDBX_SUCCESS) { if (env->me_psize >= env->me_os_psize) {