Operation not permitted when running a script from crontab
Hello!
I have a problem that I bash file run from cron gives ”bash: operation not permitted”.
In crontab I have:
19,34 * * * * /Users/rickiekaveby/Documents/perl/uah/fix_uah.sh >/tmp/stdout.log 2>/tmp/stderr.log
When the script has run from crontab /tmp/stderr.log looks like this:
/bin/bash: /Users/rickiekaveby/Documents/perl/uah/fix_uah.sh: Operation not permitted
The script start with
#!/bin/bash
Running the script in terminal is working ok:
cd /Users/rickiekaveby/Documents/perl/uah; ./fix_uah.sh
Rickies-MacBook-Pro:uah rickiekaveby$
The script creates some files in /Users/rickiekaveby/Documents/perl/uah
I have added full disk access for bash and terminal, so that’s not the problem.
Thankful for any hint!
Rickie
MacBook Pro 15″, macOS 12.6