1

I have built apache http server from source in macosx monterey. If I run from a logged in user its ok. I have created a launch daemon script in /Library/LaunchDaemons to launch it every 5 seconds with apachectl start because I have the files in USB removable drive. When launchd tries to start the server I get access denied from the sandboxd while httpd is trying to read files off the USB drive.

How do I get around this ?

2
  • I have done the 'Full disk access' on the httpd binary, but it did not work. I am doing it in a alternative way: I set up the mac to have no login prompt and added a apple script exported as an application to the default user login items. The script runs when the machine boots into the users session and runs the daemons- Like that there are no restrictions.
    – dlsa
    Commented Oct 26 at 21:44
  • That’s probably because the binary is self-signed. If you were to sign it with a registered code-signing certificate, it might work. Your solution won’t allow the server to bind the usual ports, but apparently that doesn’t matter for your application.
    – Linc Davis
    Commented Oct 26 at 22:35

1 Answer 1

2

Please go to System Preferences > Privacy & Security > Full Disk Access and add the httpd binary to the allowed list. Then restart the server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .