dropbox

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:

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Go to the Performance tab, and click Open Resource Monitor at the bottom.
  3. In Resource Monitor, go to the CPU tab.
  4. Expand the Associated Handles section.
  5. In the search box, paste the name of the locked file.
  6. 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

  1. Open Terminal (via Cmd + Space, type Terminal).
  2. Run lsof pointing to your locked file:
    # List processes holding a lock on the specified file
    lsof ~/Dropbox/Documents/Project.docx
  3. The terminal will return a table with column headers like COMMAND, PID, and USER. 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

  1. Open your Dropbox folder in File Explorer (Windows) or Finder (macOS).
  2. Right-click the locked file.
  3. Select Unlock editing (or Unlock file).

Unlock a File on Dropbox.com

  1. Sign in to Dropbox.com.
  2. Navigate to the folder containing the file.
  3. Hover over the file, click the ellipsis (), and select Unlock.

5. Summary Quick Reference Checklist

Action TargetOperating SystemTerminal Command / ActionExpected Outcome
Check Lock StatusWindowsPowerShell script in Section 2Reports whether the file is write-locked.
Find Locking AppWindowsResource Monitor > CPU > Associated HandlesDisplays the executable holding the lock.
Kill Office LocksWindowstaskkill /f /im winword.exeReleases locks held by Microsoft Office.
Find Locking AppmacOSlsof <file-path>Lists the process name and PID holding the file lock.
Kill macOS ProcessmacOSkill -9 <PID>Forces the application holding the lock to close.
Unlock in CloudWeb BrowserWeb Portal > File Options > UnlockUnlocks files that were restricted by team members.