[BUG] ranchercli - readable warning that give no meaning on windows
Rancher Server Setup
- Rancher version: v2.9.0
- Installation option (Docker install/Helm Chart):
- If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc):
- Proxy/Cert Details:
Information about the Cluster
- Kubernetes version:
- Cluster Type (Local/Downstream):
- If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider):
User Information
- What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom)
- If custom, define the set of permissions:
na
Describe the bug
To Reproduce
Go to any windows client with ranchercli installed and add a cli2.json config file and any opp wou'll see this error:
rancher context current time="2024-08-21T13:50:35+02:00" level=warning msg="Rancher configuration file C:\Users\mobj\.rancher\cli2.json is group-readable. This is insecure." time="2024-08-21T13:50:35+02:00" level=warning msg="Rancher configuration file C:\Users\mobj\.rancher\cli2.json is world-readable. This is insecure." Cluster:backend-test-osl Project:TSP
ls C:\\Users\\mobj\\.rancher\\cli2.json
Directory: C:\Users\mobj\.rancher
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 21.08.2024 12:26 5711 cli2.json
**Result**
Windows do not work like this. I tried setting the extended file attributes, but there is only mine user and administrator and system, there is no everyone etc. Expected Result
Get rid of this warning on windows.
Screenshots
Additional context
pull request: https://github.com/rancher/cli/pull/384
This is a duplicate of https://github.com/rancher/rancher/issues/46719, but as you've already raised a PR to resolve this I'll close 46719 in favor of this
This can be tested using version v2.11.0-rc3 of the cli
Validated that the CLI version v2.11.0-rc.3 addresses this issue and results have been reported in Qase /RM 2993. See details below:
ENVIRONMENT
- Rancher CLI version:
v2.11.0-rc.3
TEST RESULT
| # | Scenario | Test Result |
|---|---|---|
| 1 | Validate any CLI operation does not give irrelevant warnings due to OS permission differences | :white_check_mark: |