Running into error 0x80070021 while using your Windows system can be frustrating — especially when you’re trying to copy, move, or back up important files. This error typically occurs when a process is preventing access to the file or folder in question, often due to conflicts with other software or file permissions. Thankfully, there are several ways to troubleshoot and resolve this issue effectively.
What Is Error 0x80070021?
Error code 0x80070021 is commonly associated with the message: “The process cannot access the file because another process has locked a portion of the file.” This error generally shows up when you attempt to perform file operations, and it means that something on your system is actively using the file you’re trying to work with — hence, locking it.

There are a variety of reasons why this error might occur, but the most likely culprits include:
- A background service or application is using the file.
- Microsoft Outlook is locking PST files.
- Internet Information Services (IIS) is interfering with file operations.
- A third-party backup or sync service is running.
How to Fix Error 0x80070021
Here are some effective solutions to help you resolve this issue and get back to working with your files without interruptions.
1. Close Conflicting Applications
The first and simplest fix is to make sure no other program is using the file you’re trying to copy or move. Applications such as Microsoft Outlook are known for locking files like .pst data files, making them inaccessible.
Steps:
- Close all running instances of Outlook or other file-handling applications.
- Try repeating the file operation.
2. Disable Indexing Services
Windows Indexing Service can sometimes interfere with file operations and lock files used in searches. Disabling it may eliminate the interruption.
Steps:
- Press Windows + R, type services.msc, and hit Enter.
- Locate and double-click Windows Search.
- Set the Startup type to Disabled and click Stop.
- Click Apply and then OK.
3. Stop Internet Information Services (IIS)
IIS often locks files when enabled, especially if you’re dealing with web applications or have hosted IIS sites. Disabling IIS temporarily may resolve the issue.
To turn off IIS on Windows:
- Open Control Panel and go to Programs > Turn Windows features on or off.
- Uncheck Internet Information Services.
- Click OK and restart your computer.
4. End Background Services with Task Manager
If you’re unsure which application is using the file, Task Manager can help you identify background processes that are potentially causing the error.
Steps:
- Press Ctrl + Shift + Esc to open Task Manager.
- Check under the Processes tab for any known applications using the file.
- Select the process and click End Task.

5. Use Safe Mode
If you’re still running into the error and you can’t identify what’s locking your file, try performing the action in Safe Mode. This starts Windows with a minimal set of drivers and services, reducing the chance of conflicts.
To Boot into Safe Mode:
- Click Start, hold Shift, and click Restart.
- Navigate to Troubleshoot > Advanced Options > Startup Settings.
- Click Restart, then press 4 to enable Safe Mode.
6. Disable Antivirus Tools Temporarily
Some antivirus or security software can falsely identify files as threats, locking them in the process. Temporarily disabling your antivirus may help if none of the other solutions work.
Important: Be cautious when disabling antivirus software and ensure you re-enable it afterward to stay protected.
Conclusion
Error 0x80070021 might seem daunting if you don’t know what’s causing it, but by following the steps above, you can eliminate most common sources of file lock issues on Windows. Whether it’s a simple application conflict or something more integrated like IIS, the key is to check which process is claiming the file and deal with it accordingly.
Take a methodical approach and try each of the recommended solutions — you’ll likely have the issue resolved without needing to perform a full system reset or reinstall.