How to Track Down “Access Denied” Problems


By Mark Castle on 6th February, 2013.

Denied!

Most developers come across those pesky “Access Denied” messages from time to time and some of them can be especially tricky to find. For example the other day I was trying to upgrade a self hosted wordpress installation on a server via the “Update Now” button in the wordpress administration area only to get “Installation Failed”.

I looked in the php errors text file but couldn’t see anything. I started to wonder if this was a typical case of “access denied” due to the stringent security settings we normally use here.

WordPress Failed Update

So I downloaded and fired up the excellent “Process Monitor” from SysInternals (now part of Microsoft). We’ve been huge fans of Sysinternals back since the days of NT4. Over the years we’ve grown to rely on many of the awesome utilities that Mark Russinovich and his team have developed.

Upon firing up Process Monitor it automatically starts collecting system events in real time. Firstly click the #Capture’ button to stop it capturing events. Now clear the events window ready for the next step. I brought up the wordpress update web admin panel in a page and just before clicking “Update Now” I clicked the ‘Capture’ button on the server to set it going.. it weill start filling up with lots of events, especially on extremely busy servers. As soon as you see “Installation Failed” on the wordpress page, stop the capture in Process Monitor.

Now it’s time to see if we can find any access denied messages….

Process Monitor – Access Denied

It’s easy to filter the Process Monitor output by Result = “ACCESS DENIED” if too much information has been captured. Here you can see that the php-cgi.exe process has had an “Access Denied” mesage whilst trying to create a file. This goes a very long way to helping you to pinpoint those access denied problems and hence enabling you to adjust permissions appropriately (as opposed to doing what I’ve seen many people do over the years… full control for “Everyone”).

I hope this helps anyone plagued by these issues.


Mark Castle

Director

Marks is a director at Secura hosting and one of our resident Network specialists.

Tweet me at:
@securacloud


Access More Tech Articles and Content Like This?

Sign-up to the Secura Newsletter

We never share your details or spam you. We're not that person.