I just ran into an issue that I'm pretty sure I also had about a year ago, but failed to write down then. I guess I'll have to write it down this time. I'm creating a custom list definition and after I deployed the solution and instantiated the list I got an error saying "Access denied. You do not have permission to perform this action or access this resource.", even though the permissions is set to inherit and I am the site owner and have full control.
Troubleshooting deployment errors in Sharepoint can sometimes be frustrating. Often you get some cryptic error and a inspiring message to "Please try again" when trying again really isn't going to make much of a difference.