diff --git a/services/distributeddataservice/framework/utils/corrupt_reporter.cpp b/services/distributeddataservice/framework/utils/corrupt_reporter.cpp index 405e29913f0cf2a8fa647b0fce97a18a1e17672e..c2ec47a5d3797f462f305c9e267612adb1dc04d1 100644 --- a/services/distributeddataservice/framework/utils/corrupt_reporter.cpp +++ b/services/distributeddataservice/framework/utils/corrupt_reporter.cpp @@ -35,7 +35,7 @@ bool CorruptReporter::CreateCorruptedFlag(const std::string &path, const std::st if (access(flagFileName.c_str(), F_OK) == 0) { return true; } - int fd = creat(flagFileName.c_str(), S_IRWXU | S_IRWXG); + int fd = creat(flagFileName.c_str(), S_IRUSR | S_IWUSR); if (fd == -1) { ZLOGW("Create corrupted flag fail, flagFileName:%{public}s, errno:%{public}d", Anonymous::Change(flagFileName).c_str(), errno);