Cannot call .sh script in user folder from launchd due to sandbox protection policy

I noticed that I apparently cannot call a script in a location such as /library/user/[name] using a launchd command like „bash script.sh“ as I am then getting a „Sandbox: Read File Deny“ policy error in console. However, calling the script using the same command from a terminal window works just fine.


Does anyone know where I would have to place the script file to be able to call it from a launchd command?


Many thanks!

MacBook Pro 15", macOS 10.15

Gepostet am 02. Dez. 2019 13:29

Antworten
Frage gekennzeichnet als Höchstrangige Antwort

Gepostet am 13. Feb. 2020 12:53

You must grant full disc access to bash.

1) Go to "System Preferences" > "Security & Privacy" > "Full Disk Access" and click on the "Lock" icon.

2) open Finder and go to the folder "/bin". If you can't see the folder "/bin", press SHIFT+CMD+. (point) to show hidden files and folders.

3) Drag & Drop "bash" from the folder above to the "System Preferences" window

5 Antworten
Frage gekennzeichnet als Höchstrangige Antwort

13. Feb. 2020 12:53 als Antwort auf Bijan

You must grant full disc access to bash.

1) Go to "System Preferences" > "Security & Privacy" > "Full Disk Access" and click on the "Lock" icon.

2) open Finder and go to the folder "/bin". If you can't see the folder "/bin", press SHIFT+CMD+. (point) to show hidden files and folders.

3) Drag & Drop "bash" from the folder above to the "System Preferences" window

Dieser Thread wurde vom System oder dem Community-Team geschlossen. Du kannst alle Beiträge positiv bewerten, die du hilfreich findest, oder in der Community nach weiteren Antworten suchen.

Cannot call .sh script in user folder from launchd due to sandbox protection policy

Willkommen in der Apple Support Community
Ein Forum, in dem Apple-Kunden sich gegenseitig mit ihren Produkten helfen. Melde dich mit deinem Apple Account an, um Mitglied zu werden.