I was running Vista with two NTFS partitions (OS and DATA), then formatted the first partition and installed Windows 7 RC. The second partition (DATA, drive D) had some security settings on some files and folders. After Win 7 was installed, some files on drive D were not accessible anymore and I was getting “Access Denied” I tried to right-click on the folders that were not accessible and changed their owner and adjusted permissions but still some folders were inaccessible no matter what I did. Just before giving up, I remembered that since Windows NT, there was a tool named “cacls” that allows one to display or change ACLs (access control lists). Since Windows 7 it’s named “icacls”.

To reset files permissions:

  1. Run “cmd” as Administrator
  2. Go to the drive or folder in question, for example:

    CD /D D:
    
  3. To reset all the folder/files permissions, type:

    icacls * /T /Q /C /RESET
    
  4. And that’s it! After that, the file’s permissions were reset and I could access them back again. cacls is a handy tool to change permissions on files and folders.

Reference: http://support.microsoft.com/kb/318754