Skip to main content Logo (IEC resistor symbol) logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

What to do if you cannot execute CHMOD

Published: 15-05-2010 | Author: Remy van Elst | Text only version of this article

Table of Contents

Sometimes you do strange stuff with your Linux PC.
I did yesterday, when I was experimenting with what would happen if I would chmod /usr/bin/chmod to 000. That gave me some problems. Solution from: Linux Magazine

If you like this article, consider sponsoring me by trying out a Digital Ocean VPS. With this link you'll get $100 credit for 60 days). (referral link)

If the CHMOD program is not executable anymore, you should start it via the linker.

Execute this command:

/lib/ /bin/chmod 755 /bin/chmod 

This also works for other programs, just as long you know the original path to it...

Edit: 777 edited to 755,
Here is another solution thanks to: Rainer Weikusat

perl -e 'chmod(0755, "/bin/chmod")'
Tags: chmod , permissions , tutorials