Server 2012 – taking ownership of files

I recently had issues where taking ownership of files through the GUI simply failed every time, despite indicating that it had been successful.

A bit of ‘Googling’ led me to an article on Microsoft’s website.

Launch Powershell as Administrator (if not logged in as Administrator)
Change the the drive containing the files / folders you want to assume ownership of.
Type “TAKEOWN /F e:\myfolder” without quotes press enter.

If you want to recurse through the folder, then pass the ‘/R’ option:

takeown /R /F e:\myfolder

Once you have taken ownership, you can then set permissions with ICACLS:

ICACLS e:\myfolder\*.* /grant administrators:F

– or –

ICACLS e:\myfolder\*.* /grant administrator:F

You should now have ownership of all folders / files within e:\myfolder

If you are still having problems copying the files, you may be running into UAC issues.

See this post to resolve this.

admin has written 89 articles