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?

3

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .