diff --git a/util/FileCreator.cpp b/util/FileCreator.cpp index 7b062d65..431a6912 100644 --- a/util/FileCreator.cpp +++ b/util/FileCreator.cpp @@ -190,7 +190,7 @@ int FileCreator::openExistingFile(ThreadCtx &threadCtx, int res; { PerfStatCollector statCollector(threadCtx, PerfStatReport::FILE_OPEN); - res = open(path.c_str(), openFlags, 0644); + res = open(path.c_str(), openFlags, 0666); } if (res < 0) { WPLOG(ERROR) << "failed opening file " << path; @@ -263,7 +263,7 @@ int FileCreator::createFile(ThreadCtx &threadCtx, const string &relPathStr) { int res; { PerfStatCollector statCollector(threadCtx, PerfStatReport::FILE_OPEN); - res = open(path.c_str(), openFlags, 0644); + res = open(path.c_str(), openFlags, 0666); } if (res < 0) { if (dir.empty()) { @@ -284,7 +284,7 @@ int FileCreator::createFile(ThreadCtx &threadCtx, const string &relPathStr) { } { PerfStatCollector statCollector(threadCtx, PerfStatReport::FILE_OPEN); - res = open(path.c_str(), openFlags, 0644); + res = open(path.c_str(), openFlags, 0666); } if (res < 0) { WPLOG(ERROR) << "failed creating file " << path; diff --git a/util/TransferLogManager.cpp b/util/TransferLogManager.cpp index 11ac935a..40f2e96b 100644 --- a/util/TransferLogManager.cpp +++ b/util/TransferLogManager.cpp @@ -255,7 +255,7 @@ ErrorCode TransferLogManager::openLog() { } else { // creation of the log path (which can still be a race) WLOG(INFO) << logPath << " doesn't exist... creating..."; - fd_ = ::open(logPath.c_str(), O_CREAT | O_EXCL, 0644); + fd_ = ::open(logPath.c_str(), O_CREAT | O_EXCL, 0666); if (fd_ < 0) { WPLOG(WARNING) << "Could not create wdt log (maybe ok if race): " << logPath;