From 4a8b46417e7378adf4e79b5ca9ca0d4bd3a7c727 Mon Sep 17 00:00:00 2001 From: lvyuanyuan Date: Tue, 28 Nov 2023 12:45:21 +0800 Subject: [PATCH] =?UTF-8?q?open=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lvyuanyuan Change-Id: I0d5114f8d80b19a6278a68ef402dda5132e3020d --- interfaces/innerkits/native/file_share/src/file_share.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/innerkits/native/file_share/src/file_share.cpp b/interfaces/innerkits/native/file_share/src/file_share.cpp index 1b77656c7..f921a82d5 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; } -- Gitee