Site Collection templates missing when creating a new site

Run into this problem….  When you try to create a new Site Collection, some of the templates was missing.  In my case, someone manually override the webtemp.xml file.  So here is the path so non of you need to look for it:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\1033\XML\webtemp.xml

This xml file contains the list of site definitions (the templates) and can be marked with an option ‘Hidden=true’, which makes them invisible.

Sharepoint Error 6482: C:\WINDOWS\system32\drivers\etc\HOST access deied

Was getting the following Sharepoint error when I redirect the sharepoint to crawl itself during indexing.

Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server Shared Services Event ID: 6482
User: N/A
Computer: ******************
Description:Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance Reason: Access to the path ‘C:\WINDOWS\system32\drivers\etc\HOSTS’ is denied.
Techinal Support Details:
System.UnauthorizedAccessException: Access to the path ‘C:\WINDOWS\system32\drivers\etc\HOSTS’ is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path, Boolean append) at System.IO.FileInfo.CreateText() at Microsoft.Search.Administration.Security.HOSTSFile.CleanupDedicatedGathering(Hashtable HOSTSFileMappings, StringBuilder HOSTSComments, IEnumerable obsoleteHosts, String dedicatedName, Boolean isDirty) at Microsoft.Search.Administration.Security.HOSTSFile.ConfigureDedicatedGathering(SearchServiceInstance searchServiceInstance, SPServer dedicatedWebFrontEndServer, IList`1 previousWebApplicationHostNames) at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeDefaultContentSource(IDictionary applications) at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize() at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)

It turns out that you need to give permissions to c:\Windows\System32\Drivers\etc folder for the wss_admin_wpg account  (a local account group):
• Read & Execute
• Modify
• Read
• Write
The reason is because when you have the server crawl itself when indexing, Sharepoint manually insert items in the hosts files to force the server to crawl itself (kind of a stupid design…), so the group will needs to have write access to the files