Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

ventura / full disk access / bash

I wrote a shell script (bash) that launchd executes when a filesystem is mounted. The problem is that simple commands in the shell script fail with the error message 'operation not permitted'. A simple example is 'mkdir'. If I reduce my script to ...


| #!/bin/bash

| mkdir /Volumes/Media/directoryName

| exit


... my error log shows mkdir failed ... "operation not permitted"



  • OS: Ventura 13.1
  • I have granted Full Disk Access to 'Terminal' and the fully qualified path to the shell script
  • The mounted directory has write permission granted (sudo chmod -R a+w /Volumes/Media)


  • I have not been able to use the GUI to grant full disk access to bash. (If I use the '+' in the GUI then navigate to "Macintosh HD", the /bin directory is not shown.


My script works from the command line and launchd was able to run it before I upgraded to Ventura.


Please help --


P.S. I would prefer to use ksh over bash. The abbreviated script shown above uses bash just so I can show what the error is not. The complete script (not shown) is written for ksh and, as I said, works fine. If you can show me how to grant full disk access to ksh, (and full disk access is the underlying problem) please do so.


Thank you --

MacBook Air 13″, macOS 13.1

Posted on Jan 28, 2023 2:43 PM

Reply
Question marked as Best reply

Posted on Jan 28, 2023 3:19 PM

In the open file dialog when picking the app, type cmd-shift-g, then enter the path, /bin


You could also use cmd-shift-. , like in the Finder, to show hidden files.

Cmd-shift-. will toggle showing and hiding.

Similar questions

2 replies

ventura / full disk access / bash

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.