diff --git a/services/hilogd/log_persister.cpp b/services/hilogd/log_persister.cpp index 7be69211d4d83d8d6dd5ed30703fc44aa5eac756..fba0d0197371bdfd1239421284fd0dcfb4f2bde7 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;