From 4196d854e7a264937b6361b50d3e7a83587e5dca Mon Sep 17 00:00:00 2001 From: Marcos Diez Date: Tue, 23 Apr 2019 06:26:57 -0300 Subject: [PATCH 1/2] /usr/bin/kubelet and /usr/bin/kubeadm now get the propper permissions. --- pkg/minikube/machine/cache_binaries.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/machine/cache_binaries.go b/pkg/minikube/machine/cache_binaries.go index b21c76d85a0f..cd1a083d5c38 100644 --- a/pkg/minikube/machine/cache_binaries.go +++ b/pkg/minikube/machine/cache_binaries.go @@ -85,7 +85,7 @@ func CacheBinary(binary, version string) (string, error) { // CopyBinary copies previously cached binaries into the path func CopyBinary(cr bootstrapper.CommandRunner, binary, path string) error { - f, err := assets.NewFileAsset(path, "/usr/bin", binary, "0641") + f, err := assets.NewFileAsset(path, "/usr/bin", binary, "0755") if err != nil { return errors.Wrap(err, "new file asset") } From 10d75b84606a6baa6d7c5e59dbdece106e40c664 Mon Sep 17 00:00:00 2001 From: Marcos Diez Date: Tue, 23 Apr 2019 06:27:34 -0300 Subject: [PATCH 2/2] ExecRunner.Copy now parses permissions in octal instead of decimal, as expected --- pkg/minikube/bootstrapper/exec_runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/minikube/bootstrapper/exec_runner.go b/pkg/minikube/bootstrapper/exec_runner.go index bdc39599489f..39863eda577c 100644 --- a/pkg/minikube/bootstrapper/exec_runner.go +++ b/pkg/minikube/bootstrapper/exec_runner.go @@ -87,7 +87,7 @@ func (*ExecRunner) Copy(f assets.CopyableFile) error { if err != nil { return errors.Wrapf(err, "error creating file at %s", targetPath) } - perms, err := strconv.Atoi(f.GetPermissions()) + perms, err := strconv.ParseInt(f.GetPermissions(), 8, 0) if err != nil { return errors.Wrapf(err, "error converting permissions %s to integer", f.GetPermissions()) }