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