Skip to content
How to Fix Apple Error -1407: Finder cannot complete operation because volume or file is bMappleCare Community ↗
Error -1407 macOS / Finder Resource Lockout

How to Fix Apple Error -1407: Finder cannot complete operation because volume or file is b

Reference ID: Error -1407 •

1. Overview & Failure Manifestation

Error -1407 (historically bdNamErr in Carbon/File Manager, surfacing in modern macOS as a VFS-layer EBUSY / EAGAIN collision) manifests when Finder attempts a namespace mutation—rename, move, delete, or setattr—on a file or directory whose vnode (struct vnode) is pinned by an active kernel transaction or userspace file descriptor with a mandatory lock. The user encounters a modal alert sheet: “The operation can’t be completed because the item ‘filename‘ is busy.” with a single OK button. No Continue or Skip options are presented because the VFS layer returns EBUSY (errno 16) synchronously from VOP_RENAME, VOP_REMOVE, or VOP_SETATTR before Finder’s NSFileManager can initiate a retry loop.

In Console.app, filter subsystem:com.apple.finder reveals:
error 14:32:11.123456-0700 Finder [ERROR] -[TFileOperationMain _performOperationWithError:] Error Domain=NSCocoaErrorDomain Code=-1407 "The operation couldn't be completed. (Cocoa error -1407.)" UserInfo={NSFilePath=/Users/.../file.txt, NSUnderlyingError=0x600003b8c0f0 {Error Domain=NSPOSIXErrorDomain Code=16 "Resource busy"}}

Simultaneously, log show --predicate 'eventMessage contains "EBUSY"' --last 5m surfaces kernel tracepoints: vnode_lock_spin: vnode 0xffffff801a2b3c00 already locked by thread 0xffffff801d4e5a00 (mds). The volume remains mountable; diskutil list shows APFS Volume state Online. Immediate behavior: the target file/folder is frozen in Finder—context menu Move to Trash dims, drag-and-drop shows 🚫 cursor, Cmd+I Get Info displays Locked checkbox grayed out. No kernel panic occurs; the system remains responsive.

2. Silicon & Firmware Architecture Root Cause

At the silicon level, Error -1407 originates in the APFS Transaction Subsystem (apfs.kext) interacting with the VFS Vnode Lock Manager (kern/vfs_vnops.c). When a background process—typically mds (Spotlight metadata indexing), backupd (Time Machine snapshot traversal), fileproviderd (iCloud Drive placeholder resolution), or fsck_apfs (background consistency scan)—opens a file with O_EVTONLY or acquires a F_FULLFSYNC barrier, the APFS driver initiates a transaction handle (apfs_trans_t) pinned to the volume's superblock in NVRAM. This transaction holds a shared-exclusive lock on the target vnode's v_lock (a lck_rw_t protecting v_data and v_flag).

On Apple Silicon (M1/M2/M3), the Storage Controller (ASC) firmware manages NAND wear-leveling and encryption (AES-XTS via AMX blocks). A background TRIM operation or GC cycle can extend the transaction commit latency beyond the VFS vn_lock timeout (default 500 ms, tunable via sysctl vfs.vnlock_timeout). The PMIC (PMGR) power rail VDD_NAND remains stable; no brownout occurs. However, the I2C0 bus connecting the AP to the ASC may experience clock stretching during firmware command completion (CMD13 status read), adding 10–50 ms jitter. This jitter propagates up the stack: apfs_journal_flush() → apfs_sync() → VOP_FSYNC → vn_lock(), causing the vnode to remain in VLOCKED state when Finder issues VOP_RENAME.

On Intel Macs (T2-equipped), the BridgeOS ansd (Apple NVMe Storage Daemon) mediates APFS metadata I/O. A concurrent FileVault key rotation (triggered by fdesetup changerecovery) holds the apfs_fs_lock (global filesystem mutex) while rewrapping the Volume Encryption Key (VEK) in the Secure Enclave. The SEP (Secure Enclave Processor) firmware handshake over SPI1 (T2) or AP-SMC mailbox (M-series) introduces a non-preemptible critical section. If Finder's renameat() syscall arrives during this window, the VFS layer returns EBUSY because apfs_rename() cannot acquire apfs_fs_lock in EXCLUSIVE mode. The error is thus a lock inversion between the per-vnode v_lock and the global apfs_fs_lock, exacerbated by background maintenance tasks that extend critical section duration beyond the Finder's UI_TIMEOUT_MS (200 ms).

3. Diagnostic Verification & Terminal Commands

Execute the following commands in exact sequence. Each command targets a specific subsystem layer. Do not omit sudo where required; kernel tracing requires root.

3.1 Identify the Blocking Process (VFS Layer)

sudo lsof +D /Volumes/TargetVolume 2>/dev/null | awk '$4 ~ /[0-9]+[ruw]/ {print $1, $2, $3, $4, $9}' | sort -u

Output fields: COMMAND (process name), PID, USER, FD (file descriptor + access mode: r=read, w=write, u=read/write), PATH. Look for mds, backupd, fileproviderd, fsck_apfs, mdworker holding w or u on the target path.

3.2 Kernel Vnode Lock State (Live)

sudo dtrace -n 'fbt::vn_lock:entry /args[0]->v_vflag & VV_ROOT/ { printf("vnode %p locked by pid %d (%s)\\n", args[0], pid, execname); }' -c "sleep 10"

Output: Prints vnode address, locking PID, and process name each time a vnode lock is acquired. Correlate with target file's vnode via sudo fs_usage -f filesys | grep target_filename to obtain vnode address.

3.3 APFS Transaction Log Inspection

sudo log show --predicate 'subsystem == "com.apple.filesystems.apfs" and eventMessage contains "transaction"' --last 15m --style compact

Key fields: trans_id (transaction ID), obj_id (object ID = inode), state (OPEN, COMMITTING, COMMITTED, ABORTED), duration_ms. A transaction stuck in COMMITTING > 2000 ms indicates ASC/SEP handshake stall.

3.4 Storage Controller Firmware Health (Apple Silicon)

sudo ioreg -r -c AppleNANDController | grep -E 'FirmwareVersion|LastError|RetryCount|ECCCorrectable|ECCUncorrectable'

Fields: FirmwareVersion (e.g., 1.2.3), LastError (0 = none, non-zero = ASC error code), RetryCount (NAND read retries), ECCCorrectable/ECCUncorrectable (bit error counters). LastError != 0 mandates Phase 3.

3.5 FileProvider / iCloud Drive Placeholder Resolution

log stream --predicate 'subsystem == "com.apple.FileProvider" and category == "Materialize"' --info --style syslog

Trigger the failing Finder operation. Observe materializeItemAtURL:error: latency. > 500 ms indicates network round-trip or local cache corruption.

4. Step-by-Step Resolution Protocols

Phase 1: Rapid Software & Cache Reset (Zero Data Loss)

  1. Quit Finder gracefully: osascript -e 'tell application "Finder" to quit' (not killall Finder; preserves window state).
  2. Flush Spotlight index for target volume: sudo mdutil -i off /Volumes/TargetVolume && sudo mdutil -E /Volumes/TargetVolume && sudo mdutil -i on /Volumes/TargetVolume. Wait for mdutil -s /Volumes/TargetVolume to report Indexing enabled.
  3. Pause Time Machine local snapshots: sudo tmutil thinlocalsnapshots / 999999999999 4 (aggressive thinning) then sudo tmutil disablelocal. Re-enable after verification: sudo tmutil enablelocal.
  4. Evict iCloud Drive placeholders: brctl evict com.apple.CloudDocs /path/to/target (requires brctl from com.apple.bird; if missing, use fileproviderctl materialize /path/to/target on macOS 13+).
  5. Restart Finder: open -a Finder. Test operation.

Success criterion: Operation completes within 200 ms. If Error -1407 recurs, proceed to Phase 2.

Phase 2: Terminal / Subsystem Pipeline Flush (Command-line Remediation)

  1. Force-unmount background holders (requires SIP disabled or Recovery OS):
    Boot to macOS Recovery (Cmd+R Intel, Power button hold Apple Silicon → Options). In Recovery Terminal:

    csrutil status  # Verify SIP status
    diskutil apfs list  # Identify APFS Volume UUID (e.g., 1A2B3C4D-5E6F-7A8B-9C0D-1E2F3A4B5C6D)
    mount -o nobrowse -t apfs /dev/disk3s1 /Volumes/TargetVolume  # Mount read-write, no Finder
    lsof +D /Volumes/TargetVolume  # Identify PIDs
    kill -TERM <PID_mds> <PID_backupd> <PID_fileproviderd>
    # If processes resist:
    kill -KILL <PID>
    # Verify vnode release:
    dtrace -n 'fbt::vn_rele:entry /args[0]->v_mount == <mount_ptr>/ { printf("vrele vnode %p\\n", args[0]); }' -c "sleep 5"
    
  2. APFS Transaction Log Replay (Manual Checkpoint):
    Still in Recovery:

    fsck_apfs -y -l /dev/disk3s1  # -l = live fs, replay journal only
    # Output: "Replaying transaction log... 12 transactions replayed."
    # If "Transaction checksum mismatch" appears → Phase 3.
    
  3. Clear NVRAM/Parameter RAM (Intel) / NVRAM Reset (Apple Silicon):
    Intel: sudo nvram -c && sudo shutdown -r now
    Apple Silicon: Shutdown → Hold Power 10s → Release → Wait 5s → Power on.
  4. Verify in Normal Boot: Repeat Phase 1 test.

Phase 3: Hardware / DFU Deep Restoration (Complete Firmware Reflashing)

Applies only if: Phase 2 fails, ioreg shows LastError != 0, or fsck_apfs reports unrecoverable metadata corruption (obj_id mismatch, checksum failure on apfs_superblock_t).

  1. Apple Silicon (M1/M2/M3): Apple Configurator 2 Revive/Restore
    • Connect target Mac to host Mac via USB-C (DFU mode: Power off → Hold Power 10s → Release → Hold Power 3s + Right Shift + Left Option + Left Control for 10s → Release Power, hold keys 5s).
    • Host: Apple Configurator 2 → Select DFU device → Actions → Advanced → Revive Device (preserves user volume) or Restore Device
Still stuck on Error -1407?

Share your exact OS build and Finder/Console snippet in the OS Updates & Error Codes forum room.

Get Peer Triage →