title: -bash: cordova: command not found; or -bash: phonegap: command not found
body: <p>I am not going to ask a question, but answer one, as I have found this advice nowhere online thus far and have just figured this out myself. It's good to share, right?</p>
  
  <hr>
  
  <p>So on the command line, I did this:</p>
  
  <pre><code>sudo npm install -g cordova
  sudo npm install -g phonegap
  </code></pre>
  
  <p>Which worked fine, but when I then ran either of these lines:</p>
  
  <pre><code>My-MacBook-Pro:~ username$ cordova
  My-MacBook-Pro:~ username$ phonegap
  </code></pre>
  
  <p>I got these messages:</p>
  
  <pre><code>-bash: cordova: command not found
  -bash: phonegap: command not found
  </code></pre>
  
  <p>Why? It turned out that the permissions on my /usr/local/lib directory were set to "everyone: No Access". I changed that to "everyone: Read only" and tried again.</p>
  
  <pre><code>My-MacBook-Pro:~ username$ cordova
  My-MacBook-Pro:~ username$ phonegap
  </code></pre>
  
  <p>This time they worked! As a test I turned it back to "everyone: No Access" to see if it really was the problem. This time I got different messages:</p>
  
  <pre><code>-bash: /usr/local/bin/cordova: Permission denied
  -bash: /usr/local/bin/phonegap: Permission denied
  </code></pre>
  
  <p>The outcome was the same though, I could not call either cordova or phonegap through the command line (I'm including these last two denial messages just in case anyone searches on them).</p>