Problem: You get the infamous, unhelpful error message screen in SharePoint 2010 (“Click here to troubleshoot problems with SharePoint Foundation”) when trying to access Site Actions | Site Settings | Manage site features (or Site collection features).
Error logs show entries from the w3wp.exe process, usually entries such as “System.IO.IOException: The file or directory is corrupted and unreadable” followed by other exceptions with “...Context.RunAsProcess(CodeToRunElevated secureCode)” as their entry.
Solution: I checked the app pool for my SharePoint web app and found it was running with Network Service. For whatever reason, that account wasn’t given read access to SharePoint’s 14 hive (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14) during installation or site collection creation.
It’s hacky, and I’ve not done a lot of validation, but simply granting Network Service read/write/modify privs to this folder solved my problem.
IMPORANT NOTE: This was on a dev box. I’ll dig deeper before doing the same on a production system. You should too!