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

Krew install script can fail #866

Open
GregDThomas opened this issue Nov 5, 2024 · 6 comments
Open

Krew install script can fail #866

GregDThomas opened this issue Nov 5, 2024 · 6 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@GregDThomas
Copy link

If your /tmp folder is set to noexec - a usual configuration - then the script presented at https://krew.sigs.k8s.io/docs/user-guide/setup/install/ will fail with

-bash: ./krew-linux_amd64: Permission denied

(The only workaround I can think of is to create a temporary folder somewhere other than /tmp)

@kundan2707
Copy link

@GregDThomas
it is already setting permission in start.

set -x; cd "$(mktemp -d)" &&

@kundan2707
Copy link

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Dec 9, 2024
@GregDThomas
Copy link
Author

@GregDThomas it is already setting permission in start.

set -x; cd "$(mktemp -d)" &&

This doesn't work if /tmp is set to noexec.

@ahmetb
Copy link
Member

ahmetb commented Dec 9, 2024

I don't know how does someone's /tmp have noexec. How frequent is this setup? I'm trying to understand if this is worth addressing.

@GregDThomas
Copy link
Author

A quote from https://serverfault.com/questions/72356/how-useful-is-mounting-tmp-noexec

Many people (including the Securing Debian Manual) recommend mounting /tmp with the noexec,nodev,nosuid set of options.

@GregDThomas
Copy link
Author

FWIW, it may be sufficient to do something like;

TMPDIR=~/.tmp (
  set -x; cd "$(mktemp -d)" &&
...
)

to use another folder that isn't noexec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

4 participants