Skip to content

With a non-admin user, if a package update fails after elevation, the permissions for the tmp folder are not restored #5127

Closed

Description

Brief description of your issue

Assume that:

  • The current user does not have administrative rights, but can elevate if asked
  • The package that needs to be installed will use UniGetUI Elevator to get the process to elevate permissions
  • The package update fails with: A newer package version is available in a configured source, but it does not apply to your system or requirements. Process Exit Code : -1978335189

After the failure the temporary folder is owned by the user that the process was elevedated to, not the current user.

Additionally the repair fails (it says it succeeded, but it did not fix the owner). It installs something with nuget. Below is the start of the output (before the install).

The system cannot find the file specified.
Resetting all sources...Done
ERROR: The process "winget.exe" not found.                                                                              SUCCESS: The process "WindowsPackageManagerServer.exe" with PID 11312 has been terminated. 

Steps to reproduce

Update a package update that requires UniGetUI Elevator.

Expected behavior

The owner of the tmp folder should be the current user.

Actual behavior

The owner of the tmp folder is the elevated user.

Environment

Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.2605
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0

Activity

  1. added
    Issue-Bug
    Context-Elevated-User
    and removed
    Needs-Triage
    on Jan 13, 2025
  2. BladeMF commented on Jan 15, 2025

    @BladeMF
    Author

    Actually this happens after all updates that use UniGetUI Elevator. Just updated Chrome and lost ownership of the temp folder (but not the subfolders.

    P.S. I am unsure if that needs to be reported here or in the UniGetUI repo?

  3. marticliment commented on Jan 15, 2025

    @marticliment

    This is a duplicate of #5109

  4. denelon commented on Jan 17, 2025

    @denelon
    Collaborator

    Duplicate of #5109

  5. microsoft-github-policy-service commented on Jan 17, 2025

    @microsoft-github-policy-service
    Contributor

    Hello Vladislav Kosev (@BladeMF),

    We've identified this as a duplicate of another issue or PR that already exists. This specific instance is being closed in favor of the linked issue. Please add your 👍 to the other issue to raise its priority. Thanks for your contribution!

    Template: msftbot/duplicate/closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Context-Elevated-UserIssue-BugResolution-Duplicate

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions