7

I have various rsync entries in crontab that worked reliably right up until the moment I upgraded to Catalina.

00 04 * * * /usr/local/bin/rsync --archive /Volumes/FOO [email protected]:BAR

Here rsync is installed via brew install rsync (and it is still the correct version post-upgrade). And it doesn't much matter where rsync is going: from a remote server to my local disk, from one local disk to another local disk, from my local disk to a remote server. The jobs simply do not work.

Copying/pasting the exact command out of crontab and running it directly does work, though.

Adding -vv to the cron job, I see that the list of files being evaluated simply isn't complete. Whole directories are excluded. Some files are listed... some files are not listed.

1 Answer 1

14

This requires adding cron to the Full Disk Access list.

Open System Preferences : Security & Privacy : Privacy : Full Disk Access

Both rsync and cron must be included on this list. Before Catalina, listing only rsync would work. On Catalina, rsync by itself only lets you run rsync by hand. For it to work within cron, cron must also be on the list separately.

(In the Full Disk Access preference pane, hitting Command+Shift+G will allow typing /usr/sbin/ in order to then choose cron)

2
  • Good answer. Just like you have to grant terminal.app full disk access to initiate the equivalent rsync command, cron needs it or you will get permission errors on some protected directories in Catalina. Are you sure rsync is needed once cron is added? I have terminal app added so maybe that’s the difference
    – bmike
    Commented Nov 17, 2019 at 13:20
  • I don't know if rsync needs to be listed if it's only ever going to be invoked by cron. I would expect to sometimes want to rsync by hand too, so I just left both. Commented Nov 17, 2019 at 17:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .