​​ ​

The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.


You can continue to find trusted guidance and support on the official Apple Support site. 


We want to thank the community members who have contributed their time and expertise to help others with their Apple products.


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

Similar questions

2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

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 Account.