Windows – Accidentally removed own NTFS rights from volume in Windows 7

audiontfspermissionswindows 7

I am using Windows 7 and my hard drive is partitioned to C: and D: drives.
Yesterday I tried to limit some permissions for other users to volume D and accidentally denied everything for group "Users"

Now I can not access the drive even if I am administrator to the local computer. I did not touch the administrator permissions. I can not get to the Security tab of the volume because it says "Access denied".

How can I reset NTFS permissions or get my permissions back? Option is also, if possible, to backup my data to USB drive with some software and format the disk to start over.

I have tried:

  • Booting to safe mode
  • CMD: takeown /F D: /R
  • Changed the drive letter to F: No use and reverted to D.

Thank you for your help!

Best Answer

How can I reset NTFS permissions or get my permissions back?

This can be done in two different ways, using TAKEOWN or ICALCS.

  1. Open an elevated command prompt (administrator).

  2. Run the following command:

    takeown /F "d:\" /A /R /D Y
    

Or

  1. Run the following command:

    icacls "d:\" /setowner "Administrators" /T /C
    

Further Reading

  • An A-Z Index of the Windows CMD command line - An excellent reference for all things Windows cmd line related.
  • icacls - Change file and folder permissions - display or modify Access Control Lists (ACLs) for files and folders.
  • takeown - Take ownership of a file (Windows 2003/7/2008).
Related Question