Fix OneDrive Access Denied Errors on a Secondary Hard Drive
Question details
The user needs to regain access to OneDrive files stored on a secondary hard drive after a Windows reinstall causes "Access is denied (5)" errors when metadata is edited.

- Product
- Microsoft OneDrive
- Device & OS
- Windows
- Scenario
- After reinstalling Windows, an existing OneDrive folder on a secondary drive has permissions tied to the previous Windows account SID.
- Observed behavior
- OneDrive files return "Access is denied (5)" when metadata is edited, and the user cannot manage files normally.
Confirm the secondary drive letter and OneDrive folder path in File Explorer before changing permissions. Sign in to Windows with an administrator account, because taking ownership and editing permissions requires administrator rights.
Take Ownership of the OneDrive Folder and Reset Permissions
Use this first when a Windows reinstall leaves the OneDrive folder owned by the previous account SID.
Windows identifies accounts by security identifiers (SIDs). After a reinstall, the current user has a new SID, so the old folder permissions block metadata edits even if the account name looks the same.
Open File Explorer, right-click the OneDrive root folder on the secondary hard drive, and select Properties.
Click the Security tab, then click Advanced.
At the top of Advanced Security Settings, click Change next to Owner, enter your current Windows account or email, click Check Names, and click OK.
Check Replace owner on subcontainers and objects and click Apply. Confirm if prompted.
On the Permissions tab of Advanced Security Settings, click Add, select your current account, choose Modify or Full control, and click OK.
Click Enable inheritance or check Replace all child object permission entries with inheritable permission entries from this object, then click Apply and OK.

Unlink and Reconnect OneDrive to the Existing Folder
Use this after permissions are correct to make OneDrive recognize the existing folder without re-downloading files.
Use WPS Office as a Free Microsoft Office Alternative When OneDrive Permissions Block You
If OneDrive permission errors keep interrupting your workflow, WPS Office is a free, lightweight alternative that opens and saves Microsoft Word, Excel, and PowerPoint files with a familiar interface and easy migration from Microsoft Office.

Frequently Asked Questions
Why does OneDrive show Access is denied (5) after a Windows reinstall?
Windows tracks account permissions by SID. After a reinstall, the current account has a new SID, so the existing OneDrive folder on the secondary drive still grants access to the old SID. Open the folder Properties, click the Security tab, and then click Advanced to view and change the owner.
Do I need to re-download all OneDrive files after fixing permissions?
No. After taking ownership and resetting permissions, unlink and reconnect OneDrive, then choose the existing folder when prompted. OneDrive will use the current files instead of downloading duplicates.
What permission level should I grant to the current Windows account?
Grant Modify or Full control to the current account and enable inheritance for child files. In Advanced Security Settings, add the current account, set the permission level, and apply the change to all child objects.
Can I fix the OneDrive access denied error without administrator rights?
No. Taking ownership and changing permissions on a secondary drive requires an administrator account. Sign in as an administrator or ask your IT administrator for help.
Will WPS Office fix the OneDrive permission error?
No. WPS Office does not repair Microsoft OneDrive permissions, but it is a free Office alternative that can open and edit Microsoft Word, Excel, and PowerPoint files locally while you resolve the OneDrive issue.




