How to Fix OneDrive File Locked by Another User Error
Question details
The user needs to resolve an error preventing them from overwriting, sharing, or editing a document stored in a cloud environment due to a lock placed by another user.

- Product
- Microsoft OneDrive / SharePoint
- Device & OS
- not provided
- Scenario
- Collaborating on or syncing a shared document in a Microsoft 365 cloud storage environment.
- Observed behavior
- An 'Upload failed: The file you tried to overwrite is locked by another user' message appears, halting the save or sync process.
Ensure your internet connection is stable and verify whether any colleagues currently have the exact same file actively open on their devices.
Ask the Co-Author to Close the File and Allow Synchronization
The most common cause is that another user is actively editing the file or their OneDrive client is still synchronizing changes to the server.
When multiple people access a file without real-time co-authoring fully enabled, SharePoint and OneDrive place a temporary lock on the document to prevent conflicting copies.
Reach out to the person who last edited the document and ask them to save and close the file on their device.
Wait a few minutes for the other user's OneDrive or SharePoint client to finish uploading their changes and release the server lock.
Click the OneDrive cloud icon in your system tray to ensure it displays 'Up to date'.
Open the document again to confirm the lock has been cleared and you can now edit or overwrite the file.

Restart Microsoft Office Applications and the OneDrive Client
A background process might have frozen, leaving a ghost lock on the file even after it was officially closed.
Clear the Office Document Cache
Outdated cached files on your local drive can sometimes conflict with the live version on SharePoint or OneDrive, causing a persistent lock error.
Switch to WPS Office for Seamless Cloud Collaboration
If persistent OneDrive syncing and file locking errors consistently disrupt your team's workflow, consider using WPS Office. It provides a lightweight, highly compatible alternative to Microsoft Office, featuring robust built-in cloud storage and real-time co-editing capabilities designed to eliminate frustrating lockouts.
- 1. Download and Install: Download WPS Office for free from the official website and follow the quick installation prompt.
- 2. Sign In for Cloud Access: Open WPS Office and sign in to instantly access your free WPS Cloud storage space.
- 3. Collaborate in Real-Time: Open your existing Word, Excel, or PowerPoint files and click 'Share' to seamlessly collaborate with your team without locking issues.

Frequently Asked Questions
Why does OneDrive say my file is locked when no one else is using it?
This is often referred to as a 'ghost lock'. It occurs when a previous editing session did not close properly, or a background sync process on your computer (or a colleague's) is hung, leaving the file incorrectly flagged as 'in-use' on the Microsoft server.
Can I force unlock a file in SharePoint or OneDrive?
If you have administrative privileges, you can force unlock a file in SharePoint by navigating to the document library settings and overriding the checkout. For personal OneDrive, you usually must wait for the server timeout or ask the specific user to reconnect and close the file properly.
How long does a OneDrive file lock last if the user is disconnected?
If a user's device disconnects unexpectedly while editing, a temporary lock usually times out on the Microsoft server after 10 to 30 minutes of complete inactivity, automatically releasing the file for others to edit.
Does enabling AutoSave prevent files from being locked?
Generally, yes. AutoSave enables real-time co-authoring for Microsoft 365 subscribers, allowing multiple people to edit simultaneously without locking the file. However, if any user opens the file using an older version of Office that doesn't support co-authoring, the file will be locked for everyone else.




