Solving SharePoint Site “Error: Access Denied”

I’ve been battling the dreaded “Error: Acces Denied” dialog when trying to access a subsite in a SharePoint site collection.  The oddity of the situation is that I can access the parent site no problem and the subsite is set to inherit permissions!

I went through all the usual suspects such as checking pages within the site are checked-in and published and also checking the master page and page layouts have been checked-in and approved.  Everything was fine as expected.

Having exhausted the obvious options, I noticed that the querystring for the access denied page contained more information than I expected, it referenced a particular list…


Having never noticed this before, I ran with my hunch that this might be relevant and quickly cobbled together a powershell script to list all lists within that site I was trying to access…

$web = Get-SPWeb -Identity "http://localhost/subsite"
foreach($list in $web.Lists)
	Write-Host $list.ID " " $list.Title

Low and behold the mystery GUID was listed as the ID of a document library within the site I couldn’t access. On further investigation the document library had a custom set of permissions of which my user had only been granted “Read” access to.  Quite why this results in this user not being able to access the site I’m not sure – I expect there will be some reason but I’m yet to find it.  My resolution is to temporarily increase this users permissions until I can find the exact cause.