How to Fix Cron Permission Issues in MacOS Catalina & Mojave

Apr 27, 2020 - 3 Comments

Mac Terminal icon

Some advanced Mac users may have noticed that certain shell scripts with cron, cron jobs, and crontab are either not working at all, or not able to function properly in the newest versions of MacOS, notably Mojave 10.14, Catalina 10.15 and later. Depending on the situation, this may be accompanied by a permissions error, an operation not permitted error, or a script or cronjob may simply fail silently in the background. While there are numerous reasons a cronjob may fail, strict security measures in the latest MacOS releases may also be at fault and cause problems for some users.

This article will walk through resolving cron permissions issues with the latest versions of MacOS, including MacOS Catalina and Mojave.


Note this is aimed at advanced Mac users only. If you don’t use cron and have permission related issues with it, then you will not want to make any of these modifications.

How to Grant cron Full Disk Access in MacOS

If cron is having permissions issues in the latest versions of MacOS, you will need to grant cron full disk access on the Mac. Here’s how to do this:

  1. Open System Preferences from the  Apple menu, then choose “Security & Privacy”
  2. Go to the “Privacy” tab, then select “Full Disk Access” from the side menu options
  3. Click the lock icon in the corner and authenticate with an admin password to grant permission to modify Full Disk Access settings
  4. Now from the Finder in MacOS, pull down the “Go” menu and choose “Go To Folder”
  5. The cron path in MacOS

  6. Enter the path: /usr/sbin/cron and choose Go
  7. Drag and drop “cron” into the list of apps and processes with Full Disk Access permission, ‘cron’ should now appear in the list
  8. Allow cron full disk access in MacOS

  9. Close out of System Preferences and the open Finder sbin window when finished

While you’re in the same settings section, you may also want to add the Terminal application to the Full Disk Access options to fix “Operation not permitted” Terminal error that can also be encountered by the new security measures in MacOS, and perhaps smbd too if you rely on it for networking.

Fixing cron permissions issues in MacOS

As mentioned before, this is for advanced users only, and you should not grant apps, processes, or anything else Full Disk Access if you do not know exactly what you’re doing and why you’re doing it. Cron is able to run processes automatically with full root access in the background on a Mac, which has obvious legitimate uses as well as security implications, so if you aren’t specifically needing that ability then you should not adjust this setting.

You can always revoke Full Disk Access at any time in MacOS by returning to the settings and adjusting accordingly. Similarly, you can also adjust and control what apps can access files and folders on the Mac. These security features are best left alone by most users, but advanced users often tweak these settings to accommodate specific apps and activity on their computers.

Cron is quite powerful and it can be used for all sorts of automation, backups, scripting, and other advanced activity, you can always check crontab for scripts and change the default crontab editor if you’d like too.

Did this help resolve any cron issues you were experiencing on new versions of Mac OS? Do you have any particular tips or tricks for cron? Share your thoughts and experiences in the comments.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS X, Tips & Tricks, Troubleshooting

3 Comments

» Comments RSS Feed

  1. Otis M says:

    I still have not solved my problem running an “automator” .app via cron. Used to work in the previous MacOS just fine. I get an error from Terminal as follows… zsh: permission denied: /Users/Mamed/Documents/thefileIrun.app. It’s like my directory is not accessible, but cron has full disk access?!

  2. Otis M says:

    I have tried everything here, and still have not solved my problem running an “automator” app via cron. Used to work in the previous MacOS just fine. I get an error from Terminal as follows… zsh: permission denied: /Users/Mamed/Documents/thefileIrun.app. It’s like my directory is not accessible, but cron has full disk access. Can you assist?

  3. Elwood Downey says:

    Great tip, thanks.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site