Resetting entire file permissions in drive or a folder (Windows 7)

29 Mar 2014

I was trying to restrict file access (Security Tab in properties of Drive) to Guest and user account on my personal PC yesterday morning, Suddenly i have noticed that the hole files on the drive E was not accessible and i get " you are not authorized to access this files" i was shocked to see this message.

After a long research i found that there is an useful command in Windows 7 called as asl(access control list) where you can restrict your file from any users on you system.

I Suggest you not you modify any of this settings, at middle you will be confusing in setting proper permissions.If you want to do it do it with a caution!

The following commands is useful to reset the entire file permissions on your Drive or Folder,

step 1: Run command prompt as an administrator
step 2: Go to the Drive or Folder for which you are facing the problem
           For example- if you have modified some file permissions on drive e:
           the in command prompt type "e:" without quotes.
step 3: Now you will be entered into the drive in command prompt
step 4: type "icacls * /T /Q /C /RESET"
step 5: if you own the files you will not be getting any error message, else                you will be getting "Access denied" message.
step 6: In order to overcome this ownership problem type takeown /R /F *                  and now you should have gain your ownership for all files.
step 7: Now again type command in step 4.
step 8: Thats it! you're done. Now all files has been reset to initial state.

Please bookmark this commands, It might be handy some times.

Hope you Enjoyed!

If this helped you in some ways, Please reply, share with your friends.

Tested on windows 7 Ultimate SP1 on 30 March 2013

0 comments: