title: Python cron job: /usr/local/bin: bad interpreter: Permission denied
body: <p>I have the following crontab set up in a CentOS VPS:</p>
  
  <pre><code>SHELL=/bin/bash
  HOME=/
  
  * * * * * /root/ebay/findcheapitems.py
  </code></pre>
  
  <p>The script runs fine manually using:</p>
  
  <pre><code>python2.7 ebay/findcheapitems.py
  </code></pre>
  
  <p>It has been run through dos2unix for EOL conversion, has -rwxr-xr-x permissions, and first line of the file has:</p>
  
  <pre><code>#!/usr/local/bin python2.7
  </code></pre>
  
  <p>However I am getting mail every time the cron job attempts to run, saying: </p>
  
  <pre><code>/bin/bash: /root/ebay/findcheapitems.py: /usr/local/bin: bad interpreter: Permission denied
  </code></pre>
  
  <p>I've confirmed the location of python2.7 using 'which':</p>
  
  <pre><code># which python2.7
  /usr/local/bin/python2.7
  </code></pre>
  
  <p>I'm a linux beginner so I'm sure I'm missing something simple!</p>