In case of a lost ownership of file or folder or in case of misconfigured permissions, you can use takeown.exe to take ownership back.
The fastest solution is to go to command prompt and issue the following command takeown /F <foldername> /R
The takeown command gives ownership to the user logged on to the cumputer (the user who issued the command).
The /R switch processes all subfoders and files within the folder.
After getting access to files and folders, you can configure file and folder permissions.