Fix permission value correctly 28/226328/3
authorIlho Kim <ilho159.kim@samsung.com>
Wed, 19 Feb 2020 23:52:14 +0000 (08:52 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Tue, 21 Jul 2020 08:22:41 +0000 (08:22 +0000)
Change-Id: I4f0015a58edf3483a20993406af20396bc805cc2
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
(cherry picked from commit 5c5da18e82929a3a8cd974f24ee63bdd58d6b028)

src/common/shared_dirs.cc

index 0c4f07f..d9c9ad1 100644 (file)
@@ -92,7 +92,8 @@ bool SetPackageDirectoryOwnerAndPermissions(const bf::path& path, uid_t uid) {
     return false;
 
   bf::perms perms755 = bf::all_all ^ bf::group_write ^ bf::others_write;
-  bf::perms perms644 = perms755 ^ bf::group_exe ^ bf::others_exe;
+  bf::perms perms644 =
+      bf::owner_read | bf::owner_write | bf::group_read | bf::others_read;
   bf::perms perms_setgid = perms755 | bf::set_gid_on_exe;
   boost::optional<gid_t> system_share =
     ci::GetGidByGroupName(kSystemShareGroupName);