Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugFix: ExecRunner.Copy now parses permissions strings as octal #4139

Merged
merged 2 commits into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/minikube/bootstrapper/exec_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/machine/cache_binaries.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down