How to resolve the "Operation not permitted" error when using AntCubeTool

更新时间:
复制 MD 格式

Grant Full Disk Access to Terminal to fix the shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted error on macOS.

Since macOS Mojave (10.14), macOS restricts apps from reading certain directories without Full Disk Access. When you run AntCubeTool from Terminal, Terminal is the app that requires this permission—not AntCubeTool itself.

Grant Full Disk Access to Terminal

The steps vary by macOS version.

macOS Ventura (13) and later

  1. Open System Settings.

  2. Go to Privacy & Security > Full Disk Access.

  3. Enable the toggle next to Terminal.

  4. Quit and relaunch Terminal.

macOS Monterey (12) and earlier

  1. Open System Preferences.

  2. Go to Security & Privacy > Privacy > Full Disk Access.

  3. Click the lock icon and authenticate with an admin password.

  4. Click +, navigate to Applications > Utilities, and select Terminal.

  5. Quit and relaunch Terminal.

After relaunching, run your AntCubeTool command again. The error should not appear.

Note

If the error persists after relaunching, remove Terminal from the Full Disk Access list, re-add it, and relaunch again.