3 ms·
Actually, that wouldn't work; AFAIK the binary that executes the script needs to have permission, so for example if you're adding a cron script cron has to have
by pcr910303 7y ago
Actually, that wouldn't work; AFAIK the binary that executes the script needs to have permission, so for example if you're adding a cron script cron has to have the permission, not the Terminal.app, since the cron script running has nothing to do with Terminal.app.
It's confusing. :-(
- oldmanhorton 7y agoThis is not always the case though - in order to run some applescripts, you need accessibility permissions... But you grant that to terminal.app, not applescript or not even bash that invokes applescript
- Someone 7y agoYou probably are right about that, but it can’t be fully correct. If I type “cat ”, drag in a file, and hit return, it isn’t Terminal.app that reads the file, but cat, launched by my shell (and that’s the simple case; nothing forbids me from nesting a few shells, a few sudo’s, etc. before accessing a file) ⇒ this special permission must either directly apply to all command-line tools or always be inherited on fork and/or execve (it cannot require a magic system call, as the command-line tool reading or writing data might not be Apple-supplied) I can see how opening this door “just long enough” gets hairy very easily. So, as others suggest, this may have been implemented as a “OK, let’s do it this way for now, and try and figure out whether we can better later”.