Skip to content

Instantly share code, notes, and snippets.

@imathis
Created December 3, 2010 05:05
Show Gist options
  • Save imathis/726602 to your computer and use it in GitHub Desktop.
Save imathis/726602 to your computer and use it in GitHub Desktop.
fix for allowing restarting apache via apachectl in OS X 10.5.6
`sudo apachectl restart` doesn't work in 10.5.6 you'll get this error:
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
in OS X 10.5.6 Apple updated to Apache 2.2.15, which patched quite a few vulnerabilities (see http://support.apple.com/kb/HT4435) and also broke the apachectl script.
To get sorted, edit /usr/sbin/apachectl and replace line 82
ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
with this:
ULIMIT_MAX_FILES=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment