0x80070005 means “access denied.” The title’s 0X800070005 spelling has an extra zero, so first confirm the exact HRESULT in the failing Configuration Manager log. During a site restore, the usual causes are an incorrect recovery choice, a missing or inaccessible backup, an existing database that conflicts with the selected option, or missing NTFS/share permissions for the site or SQL computer account.
Use the recovery path that matches the failure: run elevated Setup from an external copy of CD.Latest, select the correct site-server and database options, verify access to every backup and restore path, and investigate the specific object named in the log rather than changing unrelated Windows permissions.
As an Amazon Associate I earn from qualifying purchases.
What 0x80070005 means in an SCCM restore
Microsoft names HRESULT 0x80070005 E_ACCESSDENIED, or “General access denied error.” Windows returns it when a process cannot access a protected file, folder, registry key, database, share, or another secured component. It is not an SCCM-specific diagnosis by itself.
Because the commonly searched spelling 0X800070005 contains one extra zero, copy the code directly from the failing log before applying a fix. A different HRESULT can require a different remedy. For Configuration Manager recovery, inspect the relevant Setup log, Smsbkup.log, or the task-sequence smsts.log, and record the failed action and the path or object that was denied.
#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Classify the failure before changing anything
The correct repair depends on where the error occurs. Use the wording around the HRESULT and the log name to place the incident in one of these branches.
| Failure branch | Typical indication | Correct starting point |
|---|---|---|
| Site-server recovery | The Configuration Manager site server failed and must be rebuilt from a site backup or reinstalled with the original identity. | Run Setup from an external CD.Latest copy and choose Recover a site, then select the site-server recovery option that matches the available backup. |
| Site-database recovery | The SQL database was lost, corrupted, or restored separately from the site server. | Choose the database option that matches the database’s actual state. A database restored outside Configuration Manager must use Use a site database that has been manually recovered. |
| Backup or restore path access | Smsbkup.log or Setup reports that a backup file, folder, share, or destination cannot be read or written. |
Check that the destination exists and that the correct site-server and SQL computer accounts have both NTFS and share rights where applicable. |
| OSD setup-hook failure | During an operating-system deployment task sequence, the step Setup Windows and ConfigMgr reports “Failed to install OSD setup hook (0x80070005).” | Look for a custom SetupComplete.cmd in %WINDIR%SetupScripts and remove or relocate it. |
Prepare a supported Configuration Manager recovery
1. Preserve the evidence
- Stop repeating the failed recovery until you have copied the relevant Setup logs,
Smsbkup.log, orsmsts.log. - Write down the exact HRESULT, the wizard page or task-sequence step, the account shown in the log, and the full path of any denied file, share, or database.
- Confirm whether the incident is a site-server failure, a site-database failure, a backup-path failure, or the OSD setup-hook branch. Do not apply OSD instructions to a database restore, or generic Windows activation/WMI instructions to SCCM, unless the log identifies those components.
2. Use an external copy of CD.Latest
Microsoft’s supported site-recovery workflow starts with the CD.Latest folder. Copy it to a location outside the existing Configuration Manager installation folder. Running Setup from an external copy avoids using files inside the damaged or partially restored installation.
- Locate the current branch’s
CD.Latestfolder. - Copy the complete folder to a separate local disk or another approved location that is not inside the Configuration Manager installation directory.
- Open an elevated Command Prompt on the recovery computer.
- Start
setup.exefrom that copied folder and select Recover a site.
Use the wizard’s site-server and database selections that correspond to the failure. Selecting a recovery mode that does not match the actual state can produce another access-denied or database-state error even when the file permissions are correct.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Choose the right site-server recovery option
Recover with an existing Backup Site Server set
Select Recover the site server using an existing backup only when a valid Backup Site Server set is available and accessible. Verify the backup set’s location before launching the wizard, then make sure the account used by the recovery process can read every required file.
Reinstall when no usable site-server backup exists
If there is no valid Backup Site Server set, use the reinstall path offered by the recovery wizard. Supply the original site identity values requested by Setup, including the original site code, database name, hostname, and fully qualified domain name when the scenario requires them. These values must describe the failed site, not a newly invented identity.
Rank #2
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
A reinstall does not turn an inaccessible or incompatible database backup into a usable one. Handle the database choice separately and confirm that its state matches the option selected on the database page.
Select the database recovery mode that matches reality
Configuration Manager Setup offers distinct database choices. The following table shows when each is appropriate.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall| Setup choice | Use it when | Important condition |
|---|---|---|
| Recover the site database using a backup set | A Configuration Manager database backup set is available for Setup to restore. | If the database already exists, recovery fails; the existing database state must not conflict with a backup-set restore. |
| Create a new database for this site | The documented recovery scenario calls for a new database rather than restoring an existing one. | Use only when losing the previous database contents is acceptable for that scenario. |
| Use a site database that has been manually recovered | SQL Server or another supported process restored the database outside Configuration Manager. | Complete the recovery in Setup with this exact option so Configuration Manager can attach to the manually restored database. |
| Skip database recovery | The documented conditions for skipping database recovery apply to the incident. | Do not choose it merely to bypass an access-denied message; confirm that the database is available through the supported recovery design. |
When SQL Server or DPM restored the database
If SQL Server or Data Protection Manager restored the database outside Configuration Manager, do not select a backup-set restore as though Setup had created the restore. Select Use a site database that has been manually recovered and continue the site recovery wizard.
In a hierarchy, Configuration Manager attempts to recover site and global changes made after the backup. The result depends on whether the backup is still inside SQL change-tracking retention. A standalone primary site loses changes made after the backup. Treat the backup age and topology as recovery decisions, not as permission problems.
Fix backup and restore path permissions
Confirm that every destination exists
Configuration Manager backup documentation requires backup destinations to exist before the operation writes to them. Check the local folder, mapped or UNC path, and the final restore destination. A path that exists only for an administrator’s interactive session may not exist for the computer account running the service.
Rank #3
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Grant the correct NTFS permissions
Identify which computer account performs the operation in the log and in the backup layout. Depending on the configuration, this can be the site server’s Local System account, the SQL Server computer or Local System account, or both computer accounts. Give that account the minimum NTFS read or write access required for the operation on the backup and restore folders.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsCheck share permissions on UNC paths
UNC locations require share permissions in addition to NTFS permissions. A computer account can have full NTFS access and still receive 0x80070005 because the share-level permission denies the request. Review both layers on the file server, then retry the operation.
- For a backup write, verify that the responsible site or SQL computer account can create and modify files in the destination.
- For a restore read, verify that the account can enumerate the folder and read every backup file in the set.
- Check intermediate folders, not only the final directory.
- Remove stale credentials or disconnected mappings from the troubleshooting equation; services normally use computer accounts rather than a logged-on user’s mapped drive.
Do not broadly replace ACLs on the server or registry. Microsoft’s generic guidance is to identify the exact denied object in the relevant log and correct only the permission required for that object.
Run recovery interactively or unattended
Interactive wizard
The interactive wizard is useful when you need to verify each site-server and database choice. Start Setup from the external CD.Latest copy in an elevated session, choose Recover a site, and review the summary page before committing. If the summary shows a backup-set restore while the database already exists, stop and correct the database state or choose the manually recovered option as appropriate.
Unattended recovery
For repeatable or remote recovery, Microsoft supports an answer file with:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #4
- Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
setup.exe /script <answer-file>
Run the command from an elevated Command Prompt and launch it from the copied CD.Latest folder. Validate the answer file’s site identity, backup location, database mode, and recovery choices before execution. An unattended command does not bypass permissions; it will fail with the same access-denied result if the underlying account cannot access the path or database.
Repair the OSD “Setup Windows and ConfigMgr” branch
A separate Configuration Manager-specific cause appears during an operating-system deployment task sequence. Microsoft documents the message “Failed to install OSD setup hook (0x80070005).” The cause is a custom SetupComplete.cmd already present in %WINDIR%SetupScripts. Windows Setup allows only the setup-completion script that the task sequence is trying to install, so the pre-existing custom file blocks the hook.
- Inspect the reference image or task-sequence preparation steps for
%WINDIR%SetupScriptsSetupComplete.cmd. - Remove the custom file from the task sequence or offline image if it is not required.
- If its actions are needed, move those actions into explicit task-sequence steps instead of maintaining a competing
SetupComplete.cmd. - Deploy the image again and retain the new
smsts.logif the step still fails.
This branch is unrelated to restoring an SCCM site database. Apply it only when the log shows the OSD setup-hook failure during Setup Windows and ConfigMgr.
Account for topology and backup age
Standalone primary site
A standalone primary site does not have another site in the hierarchy from which to recover post-backup changes. Microsoft states that changes made after the backup are lost in this scenario. Record the backup timestamp and plan to recreate any required configuration introduced afterward.
Hierarchy or central administration site
In a hierarchy, Configuration Manager attempts to recover site and global changes made after the backup. Whether those changes can be recovered depends on the backup’s relationship to SQL change-tracking retention. A backup older than the retained change-tracking window cannot provide the same post-backup recovery behavior as a newer backup.
Therefore, when comparing recovery paths, evaluate both the topology and the backup age. A permission fix cannot restore changes that are no longer present in the backup or SQL change-tracking data.
Quick Recap
After correcting access, retry methodically
- Close the failed Setup session and correct only the denied path, account, database-state conflict, or OSD script identified in the log.
- Confirm that the backup set is complete and readable, that the target database state matches the selected Setup option, and that all required computer accounts can access local and UNC paths.
- Start Setup again from the external
CD.Latestcopy with elevation. - Choose Recover a site and recheck the site-server and database selections.
- For an externally restored SQL database, choose Use a site database that has been manually recovered.
- For an OSD task sequence, remove or relocate the conflicting custom
SetupComplete.cmdbefore rerunning deployment. - Keep the new logs. If
0x80070005returns, use the newest log to identify whether the denied object changed or whether the original permission was not applied to an intermediate folder or share.
What not to do
- Do not treat the extra-zero spelling in the search phrase as the confirmed HRESULT.
- Do not select a backup-set restore while the target database already exists.
- Do not use a normal user’s mapped drive as proof that a service or computer account can access a UNC backup path.
- Do not apply generic Windows activation, WMI, or component-store repairs unless the failing log identifies those components.
- Do not replace broad ACLs or take ownership of unrelated system folders to silence one access-denied entry.
- Do not assume a successful SQL restore completes Configuration Manager recovery; Setup must be told that the site database was manually recovered.
As an optional shortcut after reviewing the manual steps, Outbyte PC Repair can address more than 100 common Windows issues where possible, including broken system elements, invalid redirects, shared DLL files, settings that add CPU, RAM or disk load, temporary and cache files, privacy warnings, vulnerability checks, and app-crash logging. It runs on Windows 11, 10, 8 and 7, offers a free trial by category for at least two days, and then requires a paid subscription. It complements antivirus software rather than replacing it, results vary, and no tool repairs every SCCM recovery failure.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

