cli icon indicating copy to clipboard operation
cli copied to clipboard

rancher cli - readable-world and readable-user warnings have no meaning on windows client

Open fenchu opened this issue 1 year ago • 1 comments

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

fenchu avatar Aug 21 '24 13:08 fenchu

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)

HarrisonWAffel avatar Aug 21 '24 14:08 HarrisonWAffel

Closing in favor of https://github.com/rancher/cli/pull/398

HarrisonWAffel avatar Oct 17 '24 15:10 HarrisonWAffel