Skip to content

BaseContainer: rename not allowed in TEMP folder #1204

Closed

Description

@AndreaVielCGN

Relevant area(s)

Windows

Brief description of your issue

When a process is launched in a process container sandbox with T1 support (BaseContainer PSEC) the %TEMP% env var is set to something like C:\Users\<user>\AppData\Local\P\Packages\sandbox.{271fc3b3-bc0b-4ead-bb14-ad5226896536}\AC\Temp with a random guid that is different each time. However, that folder doesn't have sufficient permissions as it allow creation and deletion of file within but not rename and that is creating some issues with programs like npm and dotnet.

As a workaround I have to give readwrite permission to C:\Users\<user>\AppData\Local\P\Packages\ (since I cannot predict the guid) however is not correct since it give permission to other package folders as well. Giving this permission renames are allowed.

Steps to reproduce

Launch a program in a process container sandbox that creates and then rename files in the TEMP folder.

Expected behavior

I expect that the program is able to create and delete files in its own TEMP folder.

Actual behavior

It gets access denied during renaming.

Activity

  1. added
    Issue-Bug
    Needs-Triage
    on Sep 17, 2026
  2. added
    OS-Windows
    on Sep 17, 2026
  3. kanismohammed commented on Sep 21, 2026

    @kanismohammed
    Collaborator

    Thanks for reporting the issue. This issue is fixed in the upcoming OS updates. OS update (LCU) would be shipping end of October.

  4. removed
    Needs-Triage
    on Sep 21, 2026
  5. Kuinox commented on Nov 25, 2026

    @Kuinox

    hello Anis Mohammed Khaja Mohideen (@kanismohammed), I believe this bug isn't completely fixed.
    I retested today with Windows 11 25H2 build 26200.9974, using Codex Desktop’s MXC backend and .NET SDK 10.0.404, to build an app in the sandbox.
    Renames now succeed in the sandbox’s redirected %TEMP%, but I still see Access denied in two NuGet cache directories.
    Both NuGet\v3-cache and NuGet\plugins-cache resolve under the generated AppContainer AC#!sandbox.{GUID} directory. In v3-cache, creating, reading, copying, and deleting a scratch file worked. Renaming a file in the same directory failed with Win32 error 5, and renaming a directory failed with 0x80070005. The same operations passed in %TEMP% and in the writable workspace.

    In plugins-cache, NuGet’s PluginCacheEntry.UpdateCacheFileAsync failed at File.Move with 0x80070005. The same operation passed in the writable workspace.

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

    Issue-BugOS-Windows

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions