To reset files permissions, follow these easy 3 steps:
Step 1: Run “cmd” as Administrator.
Note: In MS Windows 8 and above, press the Win+X keys, then choose “Command Prompt (Admin)”.
Step 2: Go to the drive or folder in question, for example:
CD /D D:
Step 3: To reset all the files permissions, type:
icacls * /T /Q /C /RESET
takeown -r -f d:\sharename