Dropbox File Locked
Resolution Checklist
- 1 Identify why a file is locked in Dropbox
- 2 Diagnose and release file locks on Windows
- 3 Diagnose and release file locks on macOS
- 4 Manage Dropbox cloud-level file locks
- 5 Summary Quick Reference Checklist
Dropbox File Locked
When Dropbox displays a “File locked” or “Cannot sync: file in use” error, it means the sync engine cannot read or write to the file. This occurs either because a local application on your computer is holding an exclusive read/write lock on the file, or because someone has explicitly locked the file in the Dropbox cloud.
This guide provides steps and commands to identify the locking application and release the file lock on both Windows and macOS.
1. Primary Causes of File Locks
Dropbox file locks fall into two categories:
- Operating System File System Locks: Applications (such as Microsoft Office, Adobe Creative Cloud, or web browsers) lock files while editing to prevent corruption. Until these apps close, Dropbox cannot sync changes.
- Dropbox Cloud File Locks: Users on Dropbox Professional or Business plans can lock files. This makes the file read-only on all other synced devices until the owner unlocks it.
2. Diagnose and Release File Locks on Windows
On Windows, applications often lock files silently. Follow these instructions to find and terminate the locking program.
A. Programmatically Test for a File Lock
Open PowerShell and run this snippet to check if a specific file is locked:
# Define target file path
$filePath = "$HOME\Dropbox\Documents\Project.docx"
try {
# Attempt to open file with exclusive write access
$stream = [System.IO.File]::Open($filePath, 'Open', 'Write')
$stream.Close()
Write-Host "File is NOT locked. Dropbox should be able to sync." -ForegroundColor Green
}
catch {
Write-Host "File IS locked by another process." -ForegroundColor Red
Write-Host "Error Details: $_" -ForegroundColor Yellow
}
B. Force Close Locking Applications
Most local locks are held by Microsoft Office processes. Run the following command block in Command Prompt to force terminate them:
:: Force close common Microsoft Office locking processes
taskkill /f /im winword.exe
taskkill /f /im excel.exe
taskkill /f /im powerpnt.exe
C. Use Resource Monitor to Find the Locking App
If the file is locked by a different app:
- Press
Ctrl + Shift + Escto open Task Manager. - Go to the Performance tab, and click Open Resource Monitor at the bottom.
- In Resource Monitor, go to the CPU tab.
- Expand the Associated Handles section.
- In the search box, paste the name of the locked file.
- The list will display the process name. Right-click the process and select End Process.
3. Diagnose and Release File Locks on macOS
On macOS, you can find the locking application using the command line with the lsof (list open files) utility.
A. Identify the Locking Process in Terminal
- Open Terminal (via Cmd + Space, type
Terminal). - Run
lsofpointing to your locked file:# List processes holding a lock on the specified file lsof ~/Dropbox/Documents/Project.docx - The terminal will return a table with column headers like
COMMAND,PID, andUSER. Look for the PID (Process ID).
B. Terminate the Locking Process
Once you have the PID, run this command to terminate the locking application:
# Force terminate the locking process (replace <PID> with the number from lsof)
kill -9 <PID>
C. Release System Sandbox Locks
If Finder or macOS QuickLook is holding a lock on the file:
# Force restart Finder and QuickLook daemon to release locked handlers
killall Finder
killall QuickLookSatellite
4. Manage Dropbox Cloud-Level File Locks
If the file is locked in the cloud, you will see a padlock icon on the file.
Unlock a File on the Desktop
- Open your Dropbox folder in File Explorer (Windows) or Finder (macOS).
- Right-click the locked file.
- Select Unlock editing (or Unlock file).
Unlock a File on Dropbox.com
- Sign in to Dropbox.com.
- Navigate to the folder containing the file.
- Hover over the file, click the ellipsis (…), and select Unlock.
5. Summary Quick Reference Checklist
| Action Target | Operating System | Terminal Command / Action | Expected Outcome |
|---|---|---|---|
| Check Lock Status | Windows | PowerShell script in Section 2 | Reports whether the file is write-locked. |
| Find Locking App | Windows | Resource Monitor > CPU > Associated Handles | Displays the executable holding the lock. |
| Kill Office Locks | Windows | taskkill /f /im winword.exe | Releases locks held by Microsoft Office. |
| Find Locking App | macOS | lsof <file-path> | Lists the process name and PID holding the file lock. |
| Kill macOS Process | macOS | kill -9 <PID> | Forces the application holding the lock to close. |
| Unlock in Cloud | Web Browser | Web Portal > File Options > Unlock | Unlocks files that were restricted by team members. |