links for 2009-05-28

29 05 2009
  • Sometimes you do strange stuff with your Linux PC.
    I did yesterday, when I was expirimenting with what would happen if I would chmod /usr/bin/chmod to 000. That gave me some problems :P.

    Luckaly I had an old (dutch) Linux magazine lying around, and there was the solution! Thanx to: Linux Magazine

    If the CHMOD program is not executable anymore, you should start it via the Linker.
    I do not know what it is, but it worked. If someone knows, then please comment :).

    Execute this command:

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

    If you're on another distro that doesn't need sudo, then just su.

    This also works for other programs, just as long you know the original path to it… (/bin/rm xD)

    Edit: 777 edited to 755,
    Here is another solution thanks to: Rainer Weikusat
    perl -e 'chmod(0755, "/bin/chmod")'