To investigate a problem that we have with SharePoint 2007, I wrote a small application that monitors a folder for security changes and logs the exact date and time from these changes. I use the FileSystemWatcher to do this.
We do this because from time to time, some process alters the security settings from all folders below c:\inetpub\wwwroot\wss\virtualdirectories, causing access denied exceptions on Microsoft.SharePoint.ApplicationPages.dll.
Now I was wondering if there is a way to check which process is responsible for the security updates. That would most likely help us a lot in troubleshooting this weird problem.