TransWikia.com

win10 unable to open file folder

Super User Asked by Sam-T on January 25, 2021

Using Windows 10 – Pro, was in the process of installing a software on a local folder in C:/apps .
Now that folder has got locked – unable to open it.
I am admin on the machine – its a personal laptop.
Cant open the folder in Cmd or W.Explorer. In Cmd it says ‘access denied" , in Explorer it shows ‘read only" – cant click it open. I try unchecking the the readonly checkbox – it will uncheck but still not work, will go back – still checked.

enter image description here

I can access the folder using Powershell/admin. If I run ACL on the directory shows full Access

PS C:apps> Get-Acl c:apps | Format-List


Path   : Microsoft.PowerShell.CoreFileSystem::C:apps
Owner  : SB-DL-19sbaha
Group  : SB-DL-19sbaha
Access : NT AUTHORITYSYSTEM Allow  FullControl
         NT AUTHORITYLOCAL SERVICE Allow  FullControl
         BUILTINAdministrators Allow  FullControl
Audit  :

Tried giving access using PS:

PS C:apps> $acl = Get-Acl c:apps
PS C:apps> $owner = New-Object System.Security.Principal.NTAccount("BUILTINAdministrators")
PS C:apps> $acl.SetOwner($owner)
PS C:apps> Get-Acl c:apps | Format-List

Nothing changed.

I cant open the folder in CMD (without admin) or Explorer?

Further the software stored some config in C:WINDOWSsystem32configsystemprofileAppDataLocal – so also cant access C:WINDOWSsystem32config

2 Answers

Open Command Prompt as Administrator. Then run takeown /f "File or folder path" and then run icacls "File or folder path" /grant Users:F to grant full access to the local Users group.

Answered by Wasif Hasan on January 25, 2021

Found this nugget use Powershell/Admin Get-Acl 'known-good-folder' | Set-Acl 'problem-folder' - This worked

Will do the same to to config folder

Answered by Sam-T on January 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP