Tuesday

Error 6482: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied

This morning I came in and found a server load of errors, the Event viewer had this view;



And the error details was as follows;


Event Type: Error
Event Source: Office SharePoint Server
Event Category: Office Server Shared Services 
Event ID: 6482
Date: 1/31/2012
Time: 8:37:41 AM
User: N/A
Computer: [Server Name]
Description:
Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (3b6b8fc0-85b0-4a84-87a0-0b8364eec13e).

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, 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..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)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.



Solution;

Please grant the following permissions on the '%SystemRoot%\System32\Drivers\etc' folder to resolve the issue.
* List Folder / Read Data
* Read Attributes
* Read Extended Attributes
* Create Files / Write Data
* Create Folders / Append Data
* Write Attributes
* Write Extended Attributes
* Delete
* Read Permissions


Solution Credits see Error 6482


Thursday

Error 5214: Insufficient Permissions object 'UserData'

SharePoint Administrator reported the Error 5214, sent me the screenshot of the error below with the text.


Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Database 
Event ID: 5214
Date: 26/01/2012
Time: 10:27:23
User: N/A
Computer: [SERVER NAME]
Description:
Insufficient SQL database permissions for user '[ACCOUNTNAME]' in database 'SharePoint_AdminContent_[DATABASE GUID]' on SQL Server instance [DATABASE SERVER]. Additional error information from SQL Server is included below.


The SELECT permission was denied on the object 'UserData', database  'SharePoint_AdminContent_[DATABASE GUID]', schema 'dbo'.


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.





Solution can be found at;
http://technet.microsoft.com/en-us/library/cc561019(office.12).aspx
In this case I solved it by following;

To ensure that this account has correct permission in SQL Server

  1. Connect to the computer running SQL Server by using an account with administrator permissions.
  2. In SQL Server Management Studio, open the Security node, and then open the Logins node. You should see the account listed as a SQL Login.
  3. If the account is there, then open the database node, open the Security node under the database, and then open the Roles node.
  4. Open the Database Roles node and double-click the db_owner role to open its properties.
  5. In the Database Roles Properties dialog box, under Members of this role, you should see the database access account. If the account is not there, add it by clicking Add.



Hide "View All Site Content"

"View All Site Content" is a feature on WSS 3.0 and MOSS 2007 sites. Sometimes it can be annoying if you are like me that enjoys customising SharePoint.
In this case, I had a client that doesnt what his users to necessarily see all the lists and libraries in his customised SharePoint site so... Hide "View All Site Content"


There are several ways to hide this link but I decided to choose the security trimmed version.




Excel Calculation Services Error 5226

Lately I received a clients call regarding a problem with Excel Web Access in Office SharePoint 2007. He sent me a screenshot of the error.

"An error has occurred. Please contact your system administrator if this problem persists."


The error seemed suspicious and that prompted me to look into the issue in the events viewer on the server running the Excel Services. And I found lots of errors with Error 5226. 


Bad news!, where did it all come from... on a closer look at the error details I noticed that some account does not have permissions to create a folder or a file location for the services to run.

 


Event Type: Error
Event Source: Office SharePoint Server
Event Category: Excel Calculation Services
Event ID: 5226
Date: 19/01/2012
Time: 14:28:24
User: N/A
Computer: AZZRRR
Description:
Unable to create or access workbook cache at C:\WINDOWS\TEMP\Excel Server\FileCache\InteXDRESF. Excel Services is unable to function without a workbook cache.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Solution:
1. Manually created the file location "C:\WINDOWS\TEMP\Excel Server\FileCache\InteXDRESF"
2. Applied permissions as follows; granted WSS_ADMIN_WPG - Full Control on the "TEMP" folder.
3. Applied permissions as follows; granted WSS_WPG - Read and Write on the "TEMP" folder. 

Then I tested the web part and I still got an error;




4. I then manually created the "Ranges, SavedWorkbooks and Charts" folder (see above). These folders help to display the ranges and charts in the Excel workbook.


Then that solved the problem!

Monday

Names changes for SharePoint User

I have come across this scenario, I will be describing below several times and I am blogging it now as I had to do it again today on a client's farm.

A SharePoint user in Company XYG changes her name, sends a request to get the name changed in her Exchange Account and her Active Directory Account. IT changes name, but name shown on SharePoint user logon displays her old name.

Solution:
Use the STSADM command line "Migrateuser" to change her details.

1. Log on to the SharePoint web front end with user having Farm Admin rights
2. Open the Command Prompt
3. Set directory to 12 Hive. C:\program files\common files\microsoft shared\web server extensions\12\bin
4. Run command stsadm -o migrateuser -oldlogin domain\olduseracct -newlogin domain\newuseraccount
5. Voila! User Account changes is updated in SharePoint


Applies to WSS 3.0, MOSS 2007 (might be the same for SP2010)