Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

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
share|improve this answer
add comment

If you want to change ownership on the command line take a look at SetACL. This command should accomplish what you want:

setacl -on "path to file" -ot file -actn setowner -ownr "n:Username"

Run that from an elevated command prompt.

share|improve this answer
add comment

I try method like:

 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

but not works

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.