I'm using Mac 10.13.6. I want to add environment variables to be recognized by my Apache instance. However, I'm not able to edit the file, event when logged in as root ...

localhost:Documents davea$ sudo touch /System/Library/LaunchDaemons/org.apache.httpd.plist
touch: setting times of '/System/Library/LaunchDaemons/org.apache.httpd.plist': Operation not permitted

I was reading here -- https://osxdaily.com/2018/10/09/fix-operation-not-permitted-terminal-error-macos/ that I have to take some additional steps to allow access to certain files, but when I go to my Privacy settings, I don't see any option for unlocking "Full Disk Access" ...

enter image description here

All I want to do is edit my "/System/Library/LaunchDaemons/org.apache.httpd.plist" file. What do I need to do to make this possible?

  • Is there a less invasive way to set environment variables that Apache can reference? – Dave Mar 29 '20 at 20:07
  • You can edit it in Recovery Mode: some_command /Volumes/Main_Volume_Name/System/Library/LaunchDaemons/org.apache.httpd.plist or use another Apache (e.g. brew installed Apache) – klanomath Mar 30 '20 at 0:16

Browse other questions tagged .