Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default permissions (ACL) of "Microsoft.WindowsTerminal" folder in "WindowsApps". #13509

Closed
Fooughhy opened this issue Jul 14, 2022 · 3 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@Fooughhy
Copy link

Windows Terminal version

No response

Windows build number

10.0.19044.0

Other Software

No response

Steps to reproduce

Mess about with "WindowsApps" folder permissions without backing them up before...

Expected Behavior

No response

Actual Behavior

I would like to know if anyone could provide all the default permissions that the "%ProgramFiles%\WindowsApps" folder has, as well as the "Microsoft.WindowsTerminal" folders (I think there are two, right?). I have had an unbelievable amount of issues with Windows Store apps lately (started with only Xbox Games Pass games which stopped working), and as a final resort I tried to mess with the permissions of the folders to be able to check that the "AppxManifest.xml" was there (as there were errors indicating it wasn't, at some point at least). These issues have also prevented me from using RestorePoints which I had made once I actually got into a working state.

But now the Xbox Game Pass games are working, but for some reason there have been multiple UWP apps that doesn't work if they are started from the store (or from the context menu either, actually). And one of them is the Windows Terminal.

I received an error indicating that the "Parameter is incorrect" for "wt.exe". This led me to this thread, amd the answer by Gidsik telling me to run the command "cacls "%programfiles%\WindowsApps" /s:"D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))"" to set the correct permissions for the "WindowsApps" folder. But as that folder seems to work (other UWP apps work) I decided only to run it on the Terminal folders inside. This now means that I can't open the terminal at all anymore...

So if anyone could provide the ACLs that I can use to run that command again for the WindowsTerminal folder, that'd be hugely appreciated.

@Fooughhy Fooughhy added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jul 14, 2022
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 14, 2022
@zadjii-msft
Copy link
Member

Mess about with "WindowsApps" folder permissions without backing them up before

y tho

For real, that will fuck your machine up. Don't do that, and if there's something that suggested you do that, I'd love to reach out to the origin and find out WHY.

@zadjii-msft
Copy link
Member

@DHowett MIGHT have a way to repair this.

@DHowett
Copy link
Member

DHowett commented Jul 14, 2022

Unfortunately, there's no general way to un-mess the permissions in that folder. It doesn't exactly have "default" permissions: everything inside is ACLed based on a bunch of different things[1].

There's one script which we do not recommend running on a production system, unless you have no other option called "Windows Apps Unf**er". I won't be providing a link to it.

The best and least destructive way to fix the permissions in that folder is honestly to do an in-place upgrade to the same version of Windows you already have. That is: if you're on "Windows 11 build 22000," grab an ISO file for that same exact build and perform an upgrade that "keeps personal files/settings and apps."

[1]: Packages can share files (they're deduplicated), so sometimes the ACLs for one package include another package's ID; there's this thing called "hosted runtimes"; some packages are hosted outside this folder but have permissions to let those outside applications access this folder, etc.

@microsoft microsoft locked and limited conversation to collaborators Jul 14, 2022
@DHowett DHowett converted this issue into discussion #13511 Jul 14, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

3 participants