Operation not permitted

macOS 'Operation not permitted' fix for Terminal apps

macOS Errors Intermediate 👁 1 views 📅 May 29, 2026

Terminal or apps get 'Operation not permitted' after macOS updates. Usually a permissions or TCC database issue. Here's how to fix it fast.

Quick answer for advanced users: Run tccutil reset All in Recovery Mode, then re-add Terminal (or the affected app) to Full Disk Access and Accessibility in System Settings.

This error pops up most often after a macOS point update (like 14.3 to 14.4) or after migrating data from Time Machine. The culprit is almost always the TCC (Transparency, Consent, and Control) database getting corrupted or permissions not carrying over cleanly. You'll see it when trying to use ls on an external drive, sudo operations, or even basic file operations inside a script. Don't bother reinstalling macOS — that's overkill 90% of the time.

Step-by-step Fix

  1. Grant Full Disk Access to Terminal
    Go to System Settings > Privacy & Security > Full Disk Access. Click the lock icon to unlock changes, then click the + button. Navigate to /Applications/Utilities/ and add Terminal. If Terminal's already there, toggle it off and on again.
  2. Grant Accessibility permissions
    Same path: Privacy & Security > Accessibility. Add Terminal there too. This step matters more than most people realize — macOS restricts file system operations via the Accessibility hook for apps that aren't sandboxed.
  3. Reset the TCC database (only if step 1 fails)
    Boot into Recovery Mode (Intel: restart and hold Command+R. Apple Silicon: hold power button until you see startup options, then click Options). Open Terminal from the Utilities menu and run:
    tccutil reset All
    This clears all permission records. You'll need to re-grant permissions when you reboot, but it nukes whatever corruption was there.
  4. Restart and re-add permissions
    After the TCC reset, restart normally. You'll see system prompts asking for permissions again. Approve them. It's tedious but necessary.

Alternative Fixes

  • Check if SIP is interfering
    System Integrity Protection can block certain operations. Check its status with csrutil status in Terminal. If it's enabled (it should be), that's fine — don't disable it. But if you've manually tweaked it, re-enable it via Recovery Mode.
  • Reinstall Terminal via Homebrew
    If you use iTerm2 or another terminal emulator, reinstall it. Homebrew often handles the TCC permissions better than direct drag-and-drop installs. Run brew reinstall --cask iterm2.
  • Kill the TCC daemon
    As a last resort, kill the TCC process to force a reload:
    sudo killall -9 tccd
    This isn't a permanent fix, but it can get you unblocked immediately for testing.

Prevention Tips

Don't run macOS beta releases on your main machine. I've seen beta versions of macOS 13 and 14 regularly corrupt the TCC database. Stick with stable releases. Also, when you do macOS updates, always check privacy permissions afterward — they sometimes get reset silently. And if you use rsync or cron jobs, add your scripts to Full Disk Access explicitly. That saves you from waking up to a failed backup at 3 AM.

One more thing: if you're using sudo with nano or vim and getting permission errors, it's not the TCC — it's SIP protecting system files. That's normal. Edit only user-level files, not system ones.

Was this solution helpful?