cli
cli copied to clipboard
rancher cli - readable-world and readable-user warnings have no meaning on windows client
This warning have no meaning on windows:
PS C:\dist\dev\cli> rancher.exe context current
time="2024-08-21T15:08:25+02:00" level=warning msg="Rancher configuration file C:\\Users\\mobj\\.rancher\\cli2.json is group-readable. This is insecure."
time="2024-08-21T15:08:25+02:00" level=warning msg="Rancher configuration file C:\\Users\\mobj\\.rancher\\cli2.json is world-readable. This is insecure."
PS C:\dist\dev\cli> go build
Cluster:backend-test-osl Project:TSP
PS C:\dist\dev\cli> .\cli.exe context current
Cluster:backend-test-osl Project:TSP
To other reviewers, this is needed as permission bits on Windows are not representative of the actual ACLs set for a given file. The owner bit is always used for all three bits on Windows, so this check will always fail, even if the file has restricted access to admins only (which it is by default)
Closing in favor of https://github.com/rancher/cli/pull/398