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

fix: chmod 0755 store/PLUGIN/VER dir #841

Merged
merged 1 commit into from
Nov 10, 2023
Merged
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
7 changes: 6 additions & 1 deletion internal/installation/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,12 @@ func moveToInstallDir(srcDir, installDir string, fos []index.FileOperation) erro
tmp, err := os.MkdirTemp("", "krew-temp-move")
klog.V(4).Infof("Creating temp plugin move operations dir %q", tmp)
if err != nil {
return errors.Wrap(err, "failed to find a temporary director")
return errors.Wrap(err, "failed to find a temporary directory")
}
klog.V(4).Infof("Chmoding tmpdir to 0755", tmp)
if err := os.Chmod(tmp, 0o755); err != nil {
// mktemp gives a 0700 directory but since we move this to KREW_ROOT, we need to make it 0755
return errors.Wrap(err, "failed to chmod temp directory")
}
defer os.RemoveAll(tmp)

Expand Down