[Solved] Operation not permitted cron macOS Sonoma

SEPTEMBER 29, 2023

I was running cron jobs that worked with macOS Mojave, Catalina, Big Sur, Monterey, and Ventura but stopped working after I updated to macOS Sonoma.

Here are two sample errors.

ls: .: Operation not permitted
zip error: Nothing to do! (try: zip -qr9 ~/folder/ . -i *)

An "Operation not permitted" error message when running a cron job on macOS typically signals a permission issue.

Fix: Provide Full Disk Access to cron

cron requires the proper permissions to access other commands.

You'll need to grant "Full Disk Access" to cron or to the Terminal app to ensure it can execute jobs properly in macOS Sonoma.

Here's how.

  • Go to System Preferences > Security & Privacy > Privacy section.
  • Unlock the settings by clicking the padlock at the bottom and entering your password.
  • Select Full Disk Access from the sidebar.
  • Navigate to the /usr/sbin folder with Finder.
  • Drag the cron app to the list of allowed apps.

ChatGPT helped me get to a solution faster.