Skip to main content
Tweeted twitter.com/askdifferent/status/1185118331466113024
Let’s make this about cron. Asking a second question showing a specific list for launchd would be ideal.
Source Link
bmike
  • 241.3k
  • 80
  • 433
  • 958

On Catalina, how can a cronjob our LaunchAgentget permission to touch files on a USB disk?

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 or a LaunchAgent 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.

To me, operation not permitted smells a lot like one of these new security features, that Catalina is so full of. But I might be wronghad to grant the terminal access full disk access.

Any ideas Is there a similar restriction on this cron task?

On Catalina, how can a cronjob our LaunchAgent touch files on a USB disk?

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 or a LaunchAgent 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.

To me, operation not permitted smells a lot like one of these new security features, that Catalina is so full of. But I might be wrong.

Any ideas?

On Catalina, how can a cronjob get permission to touch files on a USB disk?

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?

Source Link
Jan
  • 335
  • 3
  • 7

On Catalina, how can a cronjob our LaunchAgent touch files on a USB disk?

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 or a LaunchAgent 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.

To me, operation not permitted smells a lot like one of these new security features, that Catalina is so full of. But I might be wrong.

Any ideas?