Sunday, July 30, 2017

Note to self: How to reset windows permissions


We have just copied a big chunk of files off a broken home NAS by mounting the hdd in a windows PC. Luckily this one has a windows format partition on it, the other one doesn't so I'll need to make a bootable Linux USB dongle, probably via https://www.pendrivelinux.com/ and boot from that.

However back to windows, and I can't read any of the files on Win10 because the permissions don't map onto the users and groups in Win10, and UAC doesn't help because it won't allow me to "be" an administrator.

But I found the answer! :-D
Run powershell "as administrator" cd to the broken directory and use this command to recursively reset the permissions to the system default set for a whole tree.:

icacls .\ /reset /T /C /L

If that doesn't work you can take ownership of the tree using this command and then try the icacls (eye cackles?) command again

takeown.exe /F .\ /R


Comments:

blog comments powered by Disqus

I know nothing, I'm not a fortune teller, and you'd be insane to think that I am. This disclaimer was cribbed from an email footer I once received. It is so ridiculous I had to have it for myself.

Statements in this blog that are not purely historical are forward-looking statements including, without limitation, statements regarding my expectations, objectives, anticipations, plans, hopes, beliefs, intentions or strategies regarding the future. Factors that could cause actual results to differ materially from the forward looking statements include risks and uncertainties such as any unforeseen event or any unforeseen system failures, and other risks. It is important to note that actual outcomes could differ materially from those in such forward-looking statements.

Danny Angus Copyright © 2006-2013 (OMG that's seven years of this nonsense)