Change the permissions and take ownership of shared files

permissionswindows-server-2008

I have domain controller (windows server 2008) with shared folders. I am logged in as administrator.
I try to take ownership of a shared folder using the command takeown /f <File name> /a /r. The result of same files is access denied. I need to delete this file and I don't know how. I search in the internet that the solution is to turn on file sharing, is that true?

Best Answer

Use the native tools.

Right click on the folder and select properties. 
Select the Security Tab Click the Advanced button. 
Select the Owner Tab. 
Click Edit. 
Select who to change the ownership to.
Click OK through all the Windows