Git - remote: error: cannot run hooks/post-receive: No such file or directory
===

I get the error :

    remote: error: cannot run hooks/post-receive: No such file or directory

When trying to push to remote. The post-receivce file exists in the correct location (testnew.git/hooks) and contains: 


    #!/bin/bash2
    export GIT_DIR=/var/www/testnew/testnew/.git/
    export GIT_WORK_TREE=/var/www/testnew/testnew/
    cd /var/www/testnew/testnew/
    
    echo "here we go..."
    git fetch
    git merge origin/master
    git submodule update --init --recursive


I've tried setting permissions on post-receive using:

    chmod a+x post-receive

But this gives same error. 
Setting permission to 755 removes the error , but the script does'nt run. 



