ITADN

include file mode with `install` command examples provided

#984Opencloudxabide 创建于 2025-03-19
C
cloudxabidecommented
<!-- Make sure that you visit our User Guide at https://kubevirt.io/user-guide. --> **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.](https://linux.die.net/man/1/install) **Additional context**: Add any other context about the issue here.
6 条评论