From ffbcb6da84503af294b58382f605e3f2433dcee3 Mon Sep 17 00:00:00 2001 From: Tomoya Fujita Date: Mon, 10 Jul 2023 01:33:07 -0700 Subject: [PATCH] change access permission to default in general. backport of #1576 for release-v1.0 Signed-off-by: Tomoya Fujita --- pkg/yurtadm/util/kubernetes/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/yurtadm/util/kubernetes/util.go b/pkg/yurtadm/util/kubernetes/util.go index 666e84e14d0..7e9e6d1ae46 100644 --- a/pkg/yurtadm/util/kubernetes/util.go +++ b/pkg/yurtadm/util/kubernetes/util.go @@ -161,7 +161,7 @@ func CheckAndInstallKubelet(kubernetesResourceServer, clusterVersion string) err klog.V(1).Infof("Skip download cni, use already exist file: %s", savePath) } - if err := os.MkdirAll(constants.KubeCniDir, 0600); err != nil { + if err := os.MkdirAll(constants.KubeCniDir, 0755); err != nil { return err } if err := util.Untar(savePath, constants.KubeCniDir); err != nil { @@ -207,7 +207,7 @@ func SetKubeletUnitConfig() error { } } - if err := os.WriteFile(constants.KubeletServiceConfPath, []byte(constants.KubeletUnitConfig), 0600); err != nil { + if err := os.WriteFile(constants.KubeletServiceConfPath, []byte(constants.KubeletUnitConfig), 0640); err != nil { return err }