winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Permission Denied when installed via --scope machine

Open Chrissi2812 opened this issue 1 year ago • 4 comments

Brief description of your issue

Tried installing zoxide via winget install --scope machine ajeetdsouza.zoxide via PowerShell and git-bash. Both resulted in this error bash: /c/Program Files/WinGet/Links/zoxide: Permission denied when run by another non admin user.

image If i manually add the Users principal here it works.

Steps to reproduce

  1. Open a Admin Windows Terminal or use an Admin Account
  2. Run winget install --scope machine ajeetdsouza.zoxide via PowerShell or git-bash
  3. Open a non admin Windows Terminal on a non Admin Account
  4. Try to run zoxide via PowerShell or git-bash

Expected behavior

The package installed via scope should be runnable by all users

Actual behavior

in git-bash:

bash: /c/Program Files/WinGet/Links/zoxide: Permission denied

in PowerShell

PS C:\WINDOWS\system32> zoxide
Fehler beim Ausführen des Programms "zoxide.exe": Der angegebenen Datei ist keine Anwendung zugeordnetIn Zeile:1
Zeichen:1
+ zoxide
+ ~~~~~~.
In Zeile:1 Zeichen:1
+ zoxide
+ ~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

Environment

Windows-Paket-Manager v1.6.3482
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.22631.3155
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.21.3482.0

WinGet-Verzeichnisse
-----------------------------------------------------------------------------------------------------------------------------------------
Protokolle                                   %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
Benutzereinstellungen                        %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Verzeichnis für portierbare Links (Benutzer) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portables Linkverzeichnis (Computer)         C:\Program Files\WinGet\Links
Portierbarer Paketstamm (Benutzer)           %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portierbarer Paketstamm                      C:\Program Files\WinGet\Packages
Portierbares Paketstamm (x86)                C:\Program Files (x86)\WinGet\Packages
Installationsprogrammdownloads               D:\Users\Arbeit\Downloads

Links
-----------------------------------------------------------------------------------------
Datenschutzerklärung              https://aka.ms/winget-privacy
Lizenzvereinbarung                https://aka.ms/winget-license
Hinweise von Drittanbietern       https://aka.ms/winget-3rdPartyNotice
Startseite                        https://aka.ms/winget
Windows Store-Nutzungsbedingungen https://www.microsoft.com/en-us/storedocs/terms-of-sale

Administratoreinstellung                  Status
-----------------------------------------------------
LocalManifestFiles                        Deaktiviert
BypassCertificatePinningForMicrosoftStore Deaktiviert
InstallerHashOverride                     Deaktiviert
LocalArchiveMalwareScanOverride           Deaktiviert

Chrissi2812 avatar Feb 15 '24 10:02 Chrissi2812

  • Related to https://github.com/microsoft/winget-pkgs/issues/136036

Trenly avatar Feb 15 '24 14:02 Trenly

Please fix this issue. It basically makes --scope machine useless.

When I install something, it is rarely that I want it to be for one user only, but rather be available for all. Unfortunately, winget is not very useful here until this issue is fixed...

j-xella avatar Jul 09 '24 18:07 j-xella