The WordPress Specialists

Granting Terminal Full Disk Access in macOS

G

Have you ever tried running a Terminal command on your Mac, only to be blocked by a pesky permission error? That’s because macOS has strong security rules. Some actions require special privileges, like Full Disk Access. But don’t worry! It’s easy to grant Terminal this access, and we’ll guide you through it step by step.

Why Does Terminal Need Full Disk Access?

macOS protects sensitive files, such as system data, Safari history, and Mail messages. By default, even Terminal can’t modify or read these protected files. If you need to run commands that interact with this data, you must give Terminal special permissions.

Without Full Disk Access, your commands might fail with “Operation not permitted” errors. This can be frustrating, but Apple does this to keep your Mac secure.

Step-by-Step Guide to Grant Full Disk Access

Let’s walk through the process of granting Terminal Full Disk Access in macOS.

1. Open System Settings

  • Click the Apple menu () in the top-left corner.
  • Select System Settings (or System Preferences on older macOS versions).

2. Navigate to Privacy & Security

  • In System Settings, scroll down and select Privacy & Security.
  • Find and click Full Disk Access.

3. Unlock the Settings

  • Look for the lock icon at the bottom left.
  • Click it and enter your Mac’s administrator password (or use Touch ID if available).

4. Add Terminal to the List

  • In the Full Disk Access section, click the + button.
  • This will open the Applications folder by default. But Terminal is stored elsewhere.
  • Press Command + Shift + G to open the “Go to Folder” window.
  • Type: /System/Applications/Utilities/ and press Return.
  • Find and select Terminal.app, then click Open.

5. Restart Terminal

  • Close and reopen Terminal for the changes to take effect.
  • Run your command again, and it should now work without errors.

Alternative: Granting Full Disk Access to a Custom Shell

Some users prefer using alternative shells like Zsh, Bash, or Fish. If your shell is different, you may need to add it separately:

  • Instead of Terminal, add the shell binary located at /bin/zsh, /bin/bash, or wherever your preferred shell is stored.
  • Follow the same steps to grant Full Disk Access.

How to Check If Full Disk Access Was Granted

Not sure if Terminal has Full Disk Access? Test it:

  1. Open Terminal.
  2. Run this command:
ls /Library/Application\ Support/com.apple.TCC/TCC.db

If you see the file list, Full Disk Access is working. If you get a “Permission denied” error, try restarting Terminal or repeat the steps.

Undoing Full Disk Access

If you no longer need Full Disk Access, you can remove it easily:

  • Go back to System Settings > Privacy & Security > Full Disk Access.
  • Select Terminal and click the button to remove it.
  • Lock the settings again by clicking the lock icon.

Stay Safe While Using Full Disk Access

Granting Full Disk Access is powerful, but use it wisely:

  • Only grant access to apps you trust.
  • Be careful when running commands with sudo as they can modify system files.
  • If unsure, remove access after you’re done.

With this guide, you’re now in control of Terminal’s permissions. Happy coding!

About the author

Ethan Martinez

I'm Ethan Martinez, a tech writer focused on cloud computing and SaaS solutions. I provide insights into the latest cloud technologies and services to keep readers informed.

Add comment

The WordPress Specialists