diff --git a/changes/5065-fleetctl-package-language b/changes/5065-fleetctl-package-language new file mode 100644 index 0000000000..2fcc0897ec --- /dev/null +++ b/changes/5065-fleetctl-package-language @@ -0,0 +1 @@ +* Fix an error generating Windows packages with `fleetctl package` on non-English localizations of Windows. diff --git a/orbit/pkg/packaging/windows.go b/orbit/pkg/packaging/windows.go index 4225a38cbf..5e7217c750 100644 --- a/orbit/pkg/packaging/windows.go +++ b/orbit/pkg/packaging/windows.go @@ -92,9 +92,13 @@ func BuildMSI(opt Options) (string, error) { } if runtime.GOOS == "windows" { - // Explicitly grant read access, otherwise within the Docker container there are permissions - // errors. - out, err := exec.Command("icacls", tmpDir, "/grant", "everyone:R", "/t").CombinedOutput() + // Explicitly grant read access, otherwise within the Docker + // container there are permissions errors. + // "S-1-1-0" is the SID for the World/Everyone group + // (a group that includes all users). + out, err := exec.Command( + "icacls", tmpDir, "/grant", "*S-1-1-0:R", "/t", + ).CombinedOutput() if err != nil { fmt.Println(string(out)) return "", fmt.Errorf("icacls: %w", err)