Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I bought a new pc and installed my old HDD as secondary drive , how can I take ownership of all files and folder on that harddrive.

I remember there was some commandline tool icals or something which could do that recursivly.

share|improve this question
Probably something like cacls c:\ /T /E /G Everyone:F – hyperslug Jan 31 '10 at 18:10
up vote 3 down vote accepted

I remember there was some commandline tool icals or something


More info here:

Display or modify Access Control Lists (ACLs) for files and folders.

share|improve this answer
yes, that was it, thanks ill figure it out from here – Jakob Cosoroaba Jan 31 '10 at 18:10
you're more than welcome :) – Molly7244 Jan 31 '10 at 18:12

I think you're looking for icacls.exe.

You can also use the older cacls.exe, but watch out. cacls /G will overwrite the entire ACL by default, which never seems to be what I want, so you have to pass /E to "edit" the ACL. On icacls /grant the behavior is reversed: edit by default, pass :r to replace the entire ACL.

icacls also supports setting the object/container inherit flags (cacls does not), but you probably don't care about that right now.

share|improve this answer

Your Answer


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.