18

I have a USB disk, that takes ages to spin up after it has gone to sleep. So in the past I used either a cron job to regularly touch a file on it, so it will never spin down.

*/5 * * * * /usr/bin/touch /Volumes/xxx/touch.txt >/tmp/stdout.log 2>/tmp/stderr.log

Only since Catalina, these jobs get a touch: /Volumes/xxx/touch.txt: Operation not permitted. When I use the same command in the console, it works nicely.

I had to grant the terminal access full disk access. Is there a similar restriction on this cron task?

1 Answer 1

29

You need to grant cron full disk access. Drag /usr/sbin/cron into the Full Disk Access area in System Preferences > Security & Privacy > Privacy tab.

Source: https://twitter.com/DaveWoodX/status/1184235412509941761

4
  • 1
    Thanks a lot! I knew it had to be something like that!
    – Jan
    Commented Oct 17, 2019 at 18:36
  • 3
    Thanks. Why does Apple have to make this so difficult!
    – Mausy5043
    Commented Dec 30, 2019 at 11:48
  • Jesus, thank you for this. Took me way too long to ask the right question and then find the relatively simple solution. :+1: Commented Nov 14, 2020 at 15:39
  • It’s amazing what you can pick up by being in the right place at the eight time in Twitter.
    – samh
    Commented Nov 16, 2020 at 0:22

You must log in to answer this question.

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