From 2225e59ca6daf3bcf8fcdd282ff52fb92c48213e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 25 Oct 2024 02:43:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?= =?UTF-8?q?=E4=B8=8D=E4=BD=BF=E7=94=A8sudo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/io/path.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/io/path.go b/pkg/io/path.go index 9b2de3cc..75f6ddd5 100644 --- a/pkg/io/path.go +++ b/pkg/io/path.go @@ -25,13 +25,13 @@ func Mkdir(path string, permission os.FileMode) error { // Chmod 修改文件/目录权限 func Chmod(path string, permission os.FileMode) error { - cmd := exec.Command("sudo", "chmod", "-R", fmt.Sprintf("%o", permission), path) + cmd := exec.Command("chmod", "-R", fmt.Sprintf("%o", permission), path) return cmd.Run() } // Chown 修改文件或目录所有者 func Chown(path, user, group string) error { - cmd := exec.Command("sudo", "chown", "-R", user+":"+group, path) + cmd := exec.Command("chown", "-R", user+":"+group, path) return cmd.Run() }