I am new in centos.I am try to do an application on it.For my application I need to install python 2.7.But the default one on server was python 2.6. So tried to upgrade the version .And accidentally I deleted the folder /usr/bin/python.After that I Installed python 2.7 through make install.I created the folder again /usr/bin/python and run command  sudo ln -s /usr/bin/python2.7 /usr/bin/python.  After this when I tried to run YUM commands I am getting the error 
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: Permission denied
drwxrwxrwx 2 root root        4096 Mar  8 00:19 python
this is permission showing for the directory /usr/bin/python
yum doesn't work with python2.7.
You should do the following
vim /usr/bin/yum
        change 
        #!/usr/bin/python
        to 
        #!/usr/bin/python2.6 
        If your python2.6 was deleted, then reinstall them and point the directory in /usr/bin/yum to your python2.6 directory.
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: Permission denied