-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
--scope machine
for zip install type incorrectly inherits permissions
#4496
Labels
Command-Install
Issue related to WinGet Install
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Portable
Issue related to portable package
Comments
microsoft-github-policy-service
bot
added
the
Needs-Triage
Issue need to be triaged
label
May 20, 2024
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
|
How to fix for those who wonderManuallySteps (using my example):
PowerShell$winget_machine_package_roots = $(winget --info) -match '^Portable Package Root (?:\(x86\))? +(.+)$'
$winget_machine_package_roots = $winget_machine_package_roots | Select-String '^Portable Package Root (?:\(x86\))? +(.+)$'
$winget_machine_package_roots = $winget_machine_package_roots | ForEach-Object {$_.Matches.Groups[1].Value}
$winget_machine_package_roots | ForEach-Object {
$acl = Get-Acl $_
$acl.SetAccessRuleProtection($true, $true)
Get-ChildItem -Path $_ -Directory | ForEach-Object {
Set-Acl -Path $_.FullName -AclObject $acl
}
} |
denelon
added
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Command-Install
Issue related to WinGet Install
Portable
Issue related to portable package
and removed
Needs-Triage
Issue need to be triaged
labels
May 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Command-Install
Issue related to WinGet Install
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Portable
Issue related to portable package
Brief description of your issue
Using
zigtools.zls
as an example.Folder where winget unpacks files itself have correct permissions, but all files inside that folder, doesn't.
Files and folders inside will incorrectly inherit (or do not inherit at all, IDK) permissions.
That will cause for non admin users inability to access/use anything what was installed in “machine” scope, which breaks whole purpose of installing machine-wide
Steps to reproduce
winget install --scope machine -e --id zigtools.zls
Expected behavior
Full permission inheritance (achieved manually by disabling and enabling back inheritance):
Actual behavior
Partial permission inheritance:
Environment
The text was updated successfully, but these errors were encountered: