From e7051152e4e03a14783793bfd1cc32b30b932d68 Mon Sep 17 00:00:00 2001 From: yaomanhai Date: Fri, 30 Jul 2021 12:21:03 +0000 Subject: [PATCH] Fix persistent restore failed Signed-off-by: yaomanhai --- services/hilogd/log_persister.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/hilogd/log_persister.cpp b/services/hilogd/log_persister.cpp index 7be6921..fba0d01 100644 --- a/services/hilogd/log_persister.cpp +++ b/services/hilogd/log_persister.cpp @@ -118,7 +118,7 @@ int LogPersister::Init() if (InitCompress() == RET_FAIL) { return RET_FAIL; } - fd = open(mmapPath.c_str(), O_RDWR | O_CREAT | O_EXCL, 0); + fd = open(mmapPath.c_str(), O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); if (fd <= 0) { if (errno == EEXIST) { cout << "File already exists!" << endl; -- Gitee