title: Really strange behavior with Linux Shell Scripts
body: <p>i am really wondering why Linux (Debian Squeeze) is acting kind of crazy.
  I've been trying to execute a simple test.sh script in my webapps directory:</p>
  
  <pre><code>/var/www/tomcat7/webapps/ROOT/WEB-INF/bin/
  </code></pre>
  
  <p>How to execute a script? Well, that would be done by entering:</p>
  
  <p><strong>EDIT: ITS NOT ABOUT WRONG (FORGOTTEN) PERMISSIONS:</strong></p>
  
  <pre><code>chmod +x test.sh 
  
  ./test.sh
  </code></pre>
  
  <p>which now gives me the following:</p>
  
  <pre><code>-bash: ./test.sh: No permission
  </code></pre>
  
  <p>test.sh is looking like this:</p>
  
  <pre><code>#!/bin/bash
  
  echo "Hello!"
  </code></pre>
  
  <p>What the hek? Copying/Moving test.sh to my home directory and execute it again, which gives me:</p>
  
  <pre><code>Hello!
  </code></pre>
  
  <p>which is actually the output from my test.sh file. So, it doesnt work in my webapp directory but it works in home? </p>
  
  <p><strong>My researches:</strong></p>
  
  <p>Trying to execute the script with sudo rights:</p>
  
  <p>When executing the script with sudo the script simply does nothing. No messages at all.</p>
  
  <p>Trying to execute it via </p>
  
  <pre><code>. test.sh
  </code></pre>
  
  <p><strong>It works! But why?</strong></p>