diff --git a/interfaces/innerkits/native/file_share/src/file_share.cpp b/interfaces/innerkits/native/file_share/src/file_share.cpp index 1b77656c79358c37e3b2eb8ab7b51a230cb4f27b..f921a82d5643380d84fa916d64257275de0d59c4 100644 --- a/interfaces/innerkits/native/file_share/src/file_share.cpp +++ b/interfaces/innerkits/native/file_share/src/file_share.cpp @@ -282,7 +282,7 @@ static int32_t CreateSingleShareFile(const string &uri, uint32_t tokenId, uint32 } for (size_t i = 0; i < info.sharePath_.size(); i++) { - if ((ret = open(info.sharePath_[i].c_str(), O_RDONLY | O_CREAT)) < 0) { + if ((ret = open(info.sharePath_[i].c_str(), O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) < 0) { LOGE("Create file failed with %{public}d", errno); return -errno; }