0

I accidentally run

sudo chmod 700 /bin && sudo chmod 700 /bin

Then I couldn't run sudo or any commands again please is there a solution?

5

Running

sudo chmod 700 /bin && sudo chmod 700 /bin

would only change the permissions on the /bin directory itself, or if it’s a symlink, the directory it points to. This would make the contents of the directory inaccessible to non-root users, but the damage is limited.

You can recover by logging in as root, or booting into a rescue environment (both of these require knowing the root password), or booting from a rescue device, and then running

chmod 755 /bin

You don’t need to re-install.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.