I just ran 'chmod -x /bin/chmod'. What did I do? How do I recover?

( or )

What to do if you cannot execute CHMOD?

This is a tricky question.. you have just removed execute permission on chmod.
Result of that is you cannot modify file permissions . Not even for chmod itself .
chmod remains usless on your system.

Here is the solution for the problem

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

or

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

1 comment:

SP said...

THanks dear

This helped me a lot