Q:

Access Denied when trying to activate a feature

I am trying to activate a sharepoint feature in 2010.  When I try to activate it I reaceive the "Access Denied" error message.  I am an admin on the server and a site admin on the site I'm trying to activate the feature on.  In the event viewer the following error shows up:
Log Name:      Application
Source:        Microsoft-SharePoint Products-SharePoint Foundation
Date:          1/30/2011 10:41:11 PM
Event ID:      6615
Task Category: Runtime
Level:         Error
Keywords:
User:          mmurphy
Computer:      SPS1.xx.com
Description:
Access denied.
Event Xml:

  
    
    6615
    14
    2
    10
    0
    0x4000000000000000
    
    2364
    
    
    Application
    SPS1.**.com
    
  
  
    Access denied.
  

Any ideas?
Thanks,

A:

In order to make modifications to the web.config you have to be a farm administrator.
When you inspect the ULS log you will find a few lines above 'Access Denied' the message:
"The SPPersistedObject, SPWebService, could not be updated because the current user is not a Farm Administrator"
When you ARE a farm administrator and still getting this message, running Paul's script can do the trick, you can find it here:
http://unclepaul84.blogspot.com/2010/06/sppersistedobject-xxxxxxxxxxx-could-not.html
Please run the script from PowerShell.
The script turns off remote administration security: Microsoft.SharePoint.Administration.SPWebService.ContentService.RemoteAdministratorAccessDenied 
You have to be careful when manually editing the web.config file. The added keys are not stored in the database and when the web.config is built again from the database the keys can(read: will be) be gone. I experienced that myself unfortunately.
Regards, Anita

