You're in Terminal, trying to move or delete a file, and bam — error 900: Operation not permitted. I've seen this on a dozen client Macs, from a freelance photographer's external drive to a small law firm's shared folder. The message is cryptic, but the fix is usually simple. Here's what's actually happening and how to get past it.
Cause 1: Terminal Doesn't Have Full Disk Access
This is the big one. Since macOS Catalina (10.15), Apple locks down access to certain folders — Desktop, Documents, Downloads, and external volumes. Even if you're an admin, Terminal can't touch those files unless you explicitly grant it Full Disk Access. I had a client last month whose backup script kept dying on this exact error. He thought the script was broken. Nope.
How to fix it
- Open System Settings (or System Preferences on older macOS).
- Go to Privacy & Security → Full Disk Access.
- Click the lock icon and enter your password.
- Click the + button and add Terminal (it's in /Applications/Utilities/).
- Make sure the toggle next to Terminal is on.
- Quit Terminal completely (Cmd+Q) and reopen it.
That's the fix for 80% of error 900 cases. If you're using iTerm2 or another terminal app, add that instead — don't add both, it can cause weird conflicts.
One gotcha: if the file is on a network share or external drive, you might also need to grant the same permission to the hosting app (like Finder) — but usually Terminal alone does it.
Cause 2: The File or Folder Is Locked
Sometimes the error isn't about permissions at all — the file has the immutable or locked flag set. This happens a lot with files downloaded from the internet (the quarantine attribute) or files you've manually locked in Finder's Get Info panel. I've also seen it on older Time Machine backups where the whole volume is marked read-only.
How to fix it
First, check if the file is locked in Finder:
- Right-click the file → Get Info.
- Look under General — if Locked is checked, uncheck it.
If that's not it, or the file is on a non-APFS drive, use Terminal to clear the flags. Run this command (replace /path/to/file with your actual file path):
chflags nouchg,noschg /path/to/file
The chflags command clears the user immutable and system immutable flags. If you get a Permission denied on that, you're dealing with SIP (System Integrity Protection) — see the next section.
Also, if the file was downloaded from the internet, macOS adds a quarantine attribute that can trigger this. Remove it with:
xattr -d com.apple.quarantine /path/to/file
That strips the 'downloaded from the internet' warning and often clears the error.
Cause 3: System Integrity Protection (SIP) Is Blocking You
If you're trying to modify something in system locations like /System, /usr, or /bin, SIP might be the culprit. This is Apple's safety net that prevents even admin users from changing protected files. I've seen people try to customize a system font or delete a built-in app and get error 900 — that's SIP doing its job.
You shouldn't disable SIP for a single file — it's a security feature that protects your whole system. But if you know what you're doing and absolutely need to modify a protected file, you can temporarily disable SIP:
- Shut down your Mac.
- Turn it on and immediately press and hold Command+R to boot into Recovery Mode.
- From the menu bar, go to Utilities → Terminal.
- Type:
csrutil disableand press Enter. - Restart your Mac.
After making your changes, re-enable SIP the same way but with csrutil enable. I can't stress this enough — don't leave SIP off. I had a client whose Mac got malware because they disabled SIP to install a pirated app and never turned it back on. Not worth it.
Quick-Reference Summary
| Cause | Quick Fix | Time |
|---|---|---|
| Terminal lacks Full Disk Access | Add Terminal in System Settings → Privacy & Security → Full Disk Access | 2 minutes |
| File is locked or quarantined | Uncheck Lock in Get Info, or run chflags nouchg and xattr -d com.apple.quarantine |
1 minute |
| SIP is protecting a system file | Disable SIP in Recovery Mode (then re-enable!) | 10 minutes (includes reboots) |
In my experience, the Full Disk Access fix solves it for most people. If you're still stuck after trying all three, check if the file is on a volume that's mounted read-only (like a DVD or some SD cards) — that'll throw error 900 too, but the fix is just copying the file to your internal drive first.