kubevirt.github.io icon indicating copy to clipboard operation
kubevirt.github.io copied to clipboard

include file mode with `install` command examples provided

Open cloudxabide opened this issue 1 year ago • 0 comments

Description: This is not necessarily an "issue", but more of a recommendation. When using the install command, I recommend adding the mode (explicitly)

From the man page: -m, --mode=MODE set permission mode (as in chmod), instead of rwxr-xr-x

Current: sudo install ${HOME}/.minikube/cache/linux/${VERSION}/kubectl /usr/local/bin

Proposed: sudo install -m 0755 ${HOME}/.minikube/cache/linux/${VERSION}/kubectl /usr/local/bin

There are numerous occasions where this recommendation would apply. Happy to submit a PR, if folks are in agreement.

What you expected: I feel it is best to explicitly set the file permissions (mode) when downloading a file and using install to deploy the file. It negates the following: say you had a system that had kubectl already installed (and correctly) and you run a command to pull kubectl and use install to put the file where it belongs. If the source happened to have the wrong file perms (someone accidentally changed to 0644 when they published), you would end up with a system where kubectl would not be exectuable.

URL: Provide a link to the documentation.

Additional context: Add any other context about the issue here.

cloudxabide avatar Mar 19 '25 12:03 cloudxabide