DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


What to do if you cannot execute CHMOD?


If you just ran 'chmod -x /bin/chmod'. What to do? How to recover it?
 
If you have just removed execute permission on chmod (/bin/chmod).
So that now you cannot modify file permissions. Not even for chmod itself .
chmod remains useless on your system.

Here is the solution for the problem.

Run the below commands whichever works in your server.

sudo /lib/ld-linux.so.2 /bin/chmod 755 /bin/chmod

or

perl -e 'chmod(0755, "/bin/chmod")'