1

iwanted to upgrade my windows but didn't want to format my data drive coz it's huge and i couldn't transfer to external HD so i formatted the windows drive and installed new version of windows and now i can't open any of the files on the data drive and iam denied access , i tried to fix this by changing the owner in the security tab inside properties but this is very time consujing coz i have thousands of files as i am a university proffessors in all formats

my question is there a way i can regain access for the entire data drive all together one time vwithout having to repeat the steps for each single file ?

MYB
  • 11

2 Answers2

0

You only need to do it once:

  • Open Explorer
  • Right-click the drive and choose Properties
  • Go to the Security tab and click Advanced
  • Click the Change owner button as you already did
  • Check the option of "Replace all child object permission entries with inheritable permission entries from this object"
  • Click OK.

enter image description here

harrymc
  • 498,455
0

This is an old school question that never seem to go out of fashion. Probably due to the windows complex and over-engineered permission system, that even most answers provided by Microsoft themselves often fail to answer.

Apparently after switching internal disks in multi-disk OS setups, the permissions tend to fail on the old disk after the new one has been installed. For example, files could suddenly get owned by NULL SID etc.

Either-way, you can try jumping through the absurd hoops of the MS instructions here, and after you realize it doesn't solve the problem, you'll be much better off trying using the Ten Forums registry hack, to add Take Ownership to your Context Menu Items.

Basically, what it does, is adding variants of the following two commands:

# Take ownership of the entire E:\ drive using takeown:
takeown /F E:\ /R /D Y

Once you have ownership, you can reset the permissions using icacls:

icacls "E:" /reset /T /Q /C

They are best documented here:

It is good idea to avoid doing this on any system related directory, in C:\. The registry implementation above tries to avoid this mistake.

Other relevant answers:

As of today, the above also works on Windows-11 Pro.

not2qubit
  • 2,651
  • 4
  • 34
  • 45