I'm trying a bash script that works fine when run from the command line (Terminal).
Apart from the shebang, it just has:
ls -alt /Users/<username>/Libary/Mail/V6/.../Lists.mbox
(Using ls
as a simple command to illustrate the problem.)
However, when I try a test run using launchd (which I set up using the Lingon X app) I get a permissions error.
1: Operation not permitted
ls: Lists.mbox: Operation not permitted
Terminal and Lingon X both have Full Disk Access allowed in Privacy pref pane, but I don't see any way to allow an individual shell script to be given such access.
I've tried running the same script using AppleScript's do shell script
but I get the same error.
The (.sh) script permissions are set to 755, so this should not be a factor.
How can I get around this please?