title: Tomcat startup script permission on Mac OS X
body: <p>I'm struggling with a Mac OS X 10.5.8 that I've started using recently for development. I successfully installed tomcat and create launchd.conf for my environment variables.</p>
  <p>I believe it works fine. Coz I can build a project with Netbeans using maven and cargo plugins successfully so i found <a href="http://neilang.com/entries/how-to-install-tomcat-on-mac-os-x/" rel="nofollow noreferrer">online</a> a script for start and stop the tomcat</p>
  <pre><code>#!/bin/bash
  
  case $1 in
   start)
    sh /Library/apache-tomcat-6.0.20/bin/startup.sh
   ;; 
   stop)
    sh /Library/apache-tomcat-6.0.20/bin/shutdown.sh
   ;;
   restart)
    sh /Library/apache-tomcat-6.0.20/bin/shutdown.sh
    sh /Library/apache-tomcat-6.0.20/bin/startup.sh
   ;;
   *)
   echo &quot;Usage :start|stop|restart&quot;
   ;;
   esac
   exit 0
  </code></pre>
  <p>That script was created in nano in sudo sh
  but when i want to run it. is spit out this</p>
  <blockquote>
  <p>sh: /usr/bin/tomcat: Permission denied</p>
  </blockquote>
  <p>I've added <code>chmod 755 *.sh and *.bat inside /Library/apache-tomcat-6.0.20/bin</code></p>
  <p>Still access denied so what do I go around that? I have the admin privileges on the machine.</p>
  <p>Thanks for reading</p>