Skip to main content

Raymii.org Raymii.org Logo

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

What to do if you cannot execute CHMOD

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


❗ This post is over fourteen years old. It may no longer be up to date. Opinions may have changed.

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

Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below. It means the world to me if you show your appreciation and you'll help pay the server costs:

GitHub Sponsorship

PCBWay referral link (You get $5, I get $20 after you've placed an order)

Digital Ocea referral link ($200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!)

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

Execute this command:

/lib/ld-linux.so.2 /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