none
Access is Denied error when restoring a .cmp file in sharepoint RRS feed

  • Question

  • I encountered the following error when restoring a .cmp backup file in sharepoint using stsadm.exe. I'd like to know what causes this error and how to resolve this error :

    [8/11/2009 3:08:18 PM]: Debug: Security check failed in OnWebImport
    [8/11/2009 3:08:18 PM]: FatalError: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
       at Microsoft.SharePoint.Library.SPRequest.OpenWeb(String bstrUrl, String& pbstrServerRelativeUrl, String& pbstrTitle, String& pbstrDescription, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, Guid& pguidScopeId, UInt32& pnAuthorID, UInt32& pnLanguage, UInt32& pnLocale, UInt16& pnTimeZone, Boolean& bTime24, Int16& pnCollation, UInt32& pnCollationLCID, Int16& pnCalendarType, Int16& pnAdjustHijriDays, Int16& pnAltCalendarType, Boolean& pbShowWeeks, Int16& pnFirstWeekOfYear, UInt32& pnFirstDayOfWeek, Int16& pnWorkDays, Int16& pnWorkDayStartHour, Int16& pnWorkDayEndHour, Int16& pnMeetingCount, Int32& plFlags, Boolean& bConnectedToPortal, String& pbstrPortalUrl, String& pbstrPortalName, Int32& plWebTemplateId, Int16& pnProvisionConfig, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, UInt64& ppermMask, Boolean& bUserIsSiteAdmin, Boolean& bHasUniquePerm, Guid& pguidUserInfoListID, Guid& pguidUniqueNavParent, Int32& plSiteFlags, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange, String& pbstrWelcomePage)
       at Microsoft.SharePoint.SPWeb.InitWeb()
       at Microsoft.SharePoint.SPWeb.get_Title()
       at Microsoft.SharePoint.Deployment.ObjectManager.GetWeb(String webUrl)
       at Microsoft.SharePoint.Deployment.FolderSerializer.GetParentWeb(SerializationInfoHelper infoHelper, ImportObjectManager objectManager)
       at Microsoft.SharePoint.Deployment.FolderSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
       at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)
       at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)
       at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
       at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
       at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)
       at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
       at Microsoft.SharePoint.Deployment.SPImport.Run()


    Thanks in advance.
    • Moved by Mike Walsh FIN Tuesday, August 11, 2009 8:18 AM admin q (From:SharePoint - General Question and Answers and Discussion)
    • Edited by ayn_gene Tuesday, August 11, 2009 9:38 AM
    Tuesday, August 11, 2009 8:08 AM

All replies

  • stsadm issue so moving to Admin
    WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com
    Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx
    Tuesday, August 11, 2009 8:18 AM
  • Hi,

     

    Before we are going to troubleshoot the issue, please help to collect the following information:

     

    ·         Post the complete the command that you performed into the forum for further analyze.

     

    ·         What version is your SharePoint server?

     

    ·         What do you want to restore?

     

    ·         How did you backup SharePoint site to a .cmp file? Please send the command or steps into the forum.

     

    ·         Did you successfully complete backup operation?

     

    ·         Check whether the account is a site owner for the site that you want to restore? Also, check whether the account has local admin privilege? If not, correct them and check the effect.

     

    If  you used SharePoint designer to backup a site, you can try to restore a site by using SharePoint Designer.

     

    For detail information about the process, please refer to the following article:

    Capture and restore content by using SharePoint Designer (Office SharePoint Server 2007)

    http://technet.microsoft.com/en-us/library/cc718728.aspx

     

    For more information about stsadm and troubleshooting backup and recovery, please refer to the following articles:

     

    Restore: Stsadm operation (Office SharePoint Server)

    http://technet.microsoft.com/en-us/library/cc262087.aspx

     

    Troubleshooting backup and recovery (Office SharePoint Server 2007)

    http://technet.microsoft.com/en-us/library/cc263025.aspx

     

    Rock Wang


    Rock Wang– MSFT
    Tuesday, August 11, 2009 9:53 AM
  • Here are my answers to your questions (see sentences in bold form):

     

    ·          What version is your SharePoint server? -- The SharePoint Server version we are using is 3.0

     

    ·          What do you want to restore? -- What I want to restore is a .cmp back-up file of the intranet site and its subsite (a blog to be specific) we have created.

     

    ·          How did you backup SharePoint site to a .cmp file? Please send the command or steps into the forum. -- Here's the steps I performed to backup the SP site to .cmp file:

    1. I created a blank site from the SP Designer.
    2. From the site's host machine, I opened the Command Prompt window and located this path: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin>
    3. Then, I typed the following command: stsadm.exe  -o export  -url  http://vm-w2kstd-12:2553/site name  -filename  test.cmp
    4. Clicked Enter and after a while, the "Operation Completed Successfully" message appears.

         After performing the backup process via command prompt, I proceeded with restoring of the backup   (.cmp) file and here are the steps I did when I restored the site:
          Note: I used two machines -- one machine where the backup file was saved and the other machine is where I want to restore the site.
    1. On the machine where I want to restore the site (which we'll refer to as site host machine), I clicked Start > Run and entered the location of the machine (which we'll refer to as source machine) where the backup file was located.
    2. Copied the backup file from the source machine and pasted it on the Desktop of the site host machine.
    3. Closed the window for the source machine.
    4. On the site host machine, I copied the backup file and pasted it to the BIN folder which is located at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin>.
    5. Then, I opened a command prompt window and located C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin>.
    6. Then, entered the following command: stsadm.exe -o import -url http://vm-w2k3std-12:2553/<name of the blank site I created> -filename test.cmp
    7. After clicking Enter, the Initiating Import message is displayed on the command prompt window and then when it reaches at the Importing ListItem/test.... This appears:
              [8/11/2009 3:08:17 PM]: Progress: Importing ListItem /test/TWwebpages?id=66.
    [8/11/2009 3:08:18 PM]: Debug: Security check failed in OnWebImport
    [8/11/2009 3:08:18 PM]: FatalError: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)
       at Microsoft.SharePoint.Library.SPRequest.OpenWeb(String bstrUrl, String& pbstrServerRelativeUrl, String& pbstrTitle, String& pbstrDescription, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, Guid& pguidScopeId, UInt32& pnAuthorID, UInt32& pnLanguage, UInt32& pnLocale, UInt16& pnTimeZone, Boolean& bTime24, Int16& pnCollation, UInt32& pnCollationLCID, Int16& pnCalendarType, Int16& pnAdjustHijriDays, Int16& pnAltCalendarType, Boolean& pbShowWeeks, Int16& pnFirstWeekOfYear, UInt32& pnFirstDayOfWeek, Int16& pnWorkDays, Int16& pnWorkDayStartHour, Int16& pnWorkDayEndHour, Int16& pnMeetingCount, Int32& plFlags, Boolean& bConnectedToPortal, String& pbstrPortalUrl, String& pbstrPortalName, Int32& plWebTemplateId, Int16& pnProvisionConfig, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, UInt64& ppermMask, Boolean& bUserIsSiteAdmin, Boolean& bHasUniquePerm, Guid& pguidUserInfoListID, Guid& pguidUniqueNavParent, Int32& plSiteFlags, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange, String& pbstrWelcomePage)
       at Microsoft.SharePoint.SPWeb.InitWeb()
       at Microsoft.SharePoint.SPWeb.get_Title()
       at Microsoft.SharePoint.Deployment.ObjectManager.GetWeb(String webUrl)
       at Microsoft.SharePoint.Deployment.FolderSerializer.GetParentWeb(SerializationInfoHelper infoHelper, ImportObjectManager objectManager)
       at Microsoft.SharePoint.Deployment.FolderSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
       at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)
       at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)
       at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
       at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
       at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)
       at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
       at Microsoft.SharePoint.Deployment.SPImport.Run()
    [8/11/2009 3:08:18 PM]: Progress: Import Completed.
    [8/11/2009 3:08:18 PM]: Finish Time: 8/11/2009 3:08:18 PM.
    [8/11/2009 3:08:18 PM]: Completed with 0 warnings.
    [8/11/2009 3:08:18 PM]: Completed with 1 errors.

         I also tried backing up and restoring the SP site via SP Designer by performing the following steps:

    1. I created a blank site from the SP Designer.
    2. Clicked File > Open Site and entered the URL of the site to be backed up.
    3. Clicked Site > Administration > Backup Website and selected Include subsites in archives checkbox.
    4. On the File Save dialog box, I specified the location and the file name of the site to be backed up.
    5. Clicked Save.
    6. After backup process was completed, a message dialog box indicating that Web site backup completed successfully appears.
        Here are the steps I performed to restore the site via SP Designer:

    1. Clicked File > Open Site and entered the URL of the blank site I created.
    2. Clicked Site > Administration > Restore Website.
    3. Selected the file of the backup I've made and then clicked Open.
    4. On the Restore Website dialog box, I clicked OK.
    5. After a while, a dialog box indicating that I do not have the permissions to restore a site appears and only site administrators are permitted to do the said operation message appears.

     

    ·          Did you successfully complete backup operation? -- Yes as the Operation Completed Successfully messages appeared on both occasions of backing up the site.

     

    ·          Check whether the account is a site owner for the site that you want to restore? Also, check whether the account has local admin privilege? If not, correct them and check the effect.  -- My account is granted with full control on the site and has local admin privilege.

     

    Thanks.


    Wednesday, August 12, 2009 12:16 AM
  • <push> help needed on the above-mentioned error.
    Wednesday, August 12, 2009 11:43 PM
  • Mike,

    Thanks for your feedback. I'm using the tool SharePoint Content Deployment Wizard (2.8 beta) to perform a number of separate list and library migrations/upgrades for a client. I recently used it a few times between 2 farms, SharePoint Enterprise 2007 site and a SharePoint Foundation 2010. There's actually 4 site collections, 2 on each farm. I used 1 for staging in each farm which helped with the upgrade process and restructuring the content. I had a number of limitations, the main one was a lack of free HDD space. Also, due to the upgrade of an Enterprise version of SharePoint to a SharePoint Foundation farm, there were countless errors. This and the slow bandwidth between farms created an inability to upgrade the content database as a whole. All of the circumstances combined forced to migrate and upgrade a number of items manually and almost every object had to 

    Anyway, I have completed almost the entire migration and was left with a simple sub site which contained 5 small sites of its own. For some reason I ran into two different errors that I hadn't ran into while migrating/upgrading the other content.

    The first issue occurred after I pressed the Finish button. The SharePoint Content Deployment Wizard immediately disappeared (crashed) without a message. Luckily the event log told me access was denied to the target site collection's content database. I granted the failing user the db_owner role to the content database which resolved the first issue.

    The second issue also occurred after I pressed the Finish button. This time the program didn't crash however, the app provided me with the typical .NET in-app thrown error. The error id was the same as this post which is what led me here. To resolve this issue I granted the same user account access as a site collection administrator. This cleared everything up. I was able to restore the backup of lists and libraries to the target site.

    Thanks,

    Zac Boyles

    Saturday, October 29, 2011 5:49 AM
  • Use the parameter -includeusersecurity in the following command

    stsadm.exe  -o export  -url  http://vm-w2kstd-12:2553/site name  -filename  test.cmp -includeusersecurity

    again use the same in your import command

    Import/export operations require Site Collection Administration permissions on the respective exporting and importing site.


    Regards, Vishwas
    • Edited by Vishwas B Sunday, October 30, 2011 10:22 PM updated
    Sunday, October 30, 2011 10:16 PM