You typed a normal command, tried to copy a folder, or ran a backup script, and macOS threw back "Operation not permitted." Nothing is broken. In almost every case this is macOS's built-in privacy layer (called TCC — Transparency, Consent, and Control) refusing to let an app or the Terminal touch protected files until you grant it access. This guide walks through the fixes in the order that actually resolves it.
What "Operation not permitted" really means
Since macOS Mojave (10.14), Apple locks down folders like your Desktop, Documents, Downloads, iCloud Drive, Photos, Mail, Messages, and Time Machine backups behind a permission system. An app — including Terminal, rsync, a backup tool, or a code editor — can see that a file exists but gets "Operation not permitted" the moment it tries to read or write it, until you explicitly allow it under Privacy & Security.
This is different from the old "Permission denied" (a Unix file-ownership error you fix with chmod/sudo). "Operation not permitted" usually ignores sudo entirely — running the command as root does not get you past TCC. That is the tell: if sudo doesn't help, it's a privacy block, not a file-permission block.
Fix 1 — Grant Full Disk Access to the app doing the work (the real fix)
This clears the vast majority of cases, especially anything involving Terminal, backups, or copying between folders.
- Open System Settings (Apple menu → System Settings). On macOS Monterey and earlier it's System Preferences.
- Go to Privacy & Security in the sidebar, then scroll to Full Disk Access.
- Click the + button (you may need to click the lock and enter your password first on older macOS).
- Navigate to Applications → Utilities and add Terminal (or add whatever app is failing — iTerm, Visual Studio Code, Carbon Copy Cloner, etc.).
- Make sure the toggle next to it is on.
- Fully quit and reopen that app. This step is not optional — TCC only re-reads the grant on a fresh launch. Quitting the Terminal window is not enough; use Cmd + Q.
Re-run your command. If it was a TCC block, it works immediately after the relaunch.
Fix 2 — If it's a specific folder, grant the folder-level permission instead
Sometimes you don't want to hand an app the keys to the whole disk. macOS also asks per-folder. If the error only happens with your Desktop, Documents, or Downloads:
- Go to Privacy & Security and check Files and Folders.
- Find the app in the list and enable the specific folders it needs (Desktop Folder, Documents Folder, etc.).
- If the app isn't listed, trigger the access once (try the operation), and macOS will usually pop a consent dialog — click Allow.
Full Disk Access (Fix 1) is the bigger hammer and covers folders that "Files and Folders" doesn't (like other users' data or system backup locations), so if the per-folder grant doesn't do it, fall back to Fix 1.
Fix 3 — The file has an "attribute" lock (extended flags)
If Fix 1 and 2 don't resolve it and the error is on one specific file, that file may carry a locked flag (common on files restored from a backup, downloaded, or copied off another Mac). In Terminal:
- Check for flags:
ls -lO yourfile— look foruchg(user immutable) orrestricted. - Clear a user-lock:
chflags nouchg yourfile
Note: files flagged restricted or living inside SIP-protected system paths (like /System, /usr) are protected by System Integrity Protection and are meant to be untouchable — that's by design, and you should not disable SIP to force it. If you're only trying to move your own documents, you're not hitting SIP; recheck Fix 1.
Fix 4 — Reset the privacy database if permissions are stuck
Occasionally the TCC database gets into a confused state where the app appears granted but still fails. Reset the Full Disk Access permissions and re-grant:
- In Terminal, run
tccutil reset SystemPolicyAllFiles(this clears Full Disk Access grants for all apps). - Reopen System Settings → Privacy & Security → Full Disk Access and re-add the app as in Fix 1.
- Restart the Mac, then retry.
A plain restart alone sometimes fixes a stuck grant too — worth trying before the reset.
Still stuck? Rule out a deeper problem
If you've granted Full Disk Access, relaunched the app, cleared file flags, and it still says "Operation not permitted" on your own files, a few less-common causes:
- MDM / work profile: a company-managed Mac can have a configuration profile that blocks these permissions. Check System Settings → General → Device Management — if there's a profile, IT controls it.
- Disk errors: run First Aid in Disk Utility on your drive.
- A dying SSD or failing macOS install: if you're also seeing beachballs, crashes, or files that vanish, the storage may be the real issue. On a Mac that's more than a few years old this is a common end-of-life symptom.
If it turns out to be hardware, it's often not worth a costly out-of-warranty repair. A clean, warrantied Apple-silicon Mac frequently costs less than the repair — refurbished MacBook Airs start at $569.99 and Mac Minis at $897.99 in our Apple clearance lineup, each covered by our own 1-year warranty. And if your current Mac still powers on, we'll take it as a trade-in toward the upgrade.
Frequently asked questions
Why doesn't sudo fix "Operation not permitted"?
Because it's a privacy (TCC) block, not a Unix ownership block. Root has no special standing with TCC — only granting the app Full Disk Access under Privacy & Security clears it.
Is "Operation not permitted" the same as "Permission denied"?
No. "Permission denied" is classic file ownership — fixable with chmod or sudo. "Operation not permitted" is macOS privacy protection and needs a Full Disk Access grant plus an app relaunch.
Do I have to restart after granting Full Disk Access?
Not usually — but you must fully quit (Cmd + Q) and reopen the app. TCC only re-reads the grant on a fresh launch. A restart only helps if the permission is stuck (Fix 4).
Is it safe to grant Terminal Full Disk Access?
Yes for your own machine. It lets Terminal (and scripts you run) reach protected folders. If you share the Mac or don't trust a script, prefer the per-folder grant in Fix 2 and remove the access when you're done.
Where is Full Disk Access on older macOS?
System Preferences → Security & Privacy → Privacy tab → Full Disk Access. Click the lock to make changes.
Need a Mac that just works? Browse our warrantied, refurbished lineup and current Apple clearance deals.