0

I ignorantly changed the permission of /usr/bin to chmod 744 by using sudo chmod 744 /usr/bin while following a guide for something that I was working on. After I did that, I was unable to open the terminal and xterm. I then turned my system off and when I turned it back on later, I was unable to login to my account. I enter the password to my account and for a fraction of a second it shows to a black screen with some text goes back to the login page. This happens when I try to sign in as guest as well. I could not read the text as the screen switches back very quickly.

Any way I can fix this?

Zanna
  • 70,465

1 Answers1

1

When the GRUB menu appears during boot (press Shift repeatedly after turning on to make it come up if it doesn't automatically appear), choose Advanced options, select Recovery mode and then select Drop to root-shell.

Now you need to run two commands:

chmod 755 /usr/bin
reboot

(You don't need sudo here as you are root already)

Now you can boot normally to Ubuntu and everything will be fine.

Zanna
  • 70,465
mook765
  • 15,925
  • I did what you've mentioned but the same problem occurs – Abhijith Bagepalli Apr 27 '17 at 12:06
  • 1
    Then you obviously made more changes to your system than you mentioned. If you ran i. g. sudo chmod -r 744 /usr/bin then there is no easy way to solve it. – mook765 Apr 27 '17 at 12:13
  • I definitely didn't use recursive to change the permission. I didn't make any other changes either – Abhijith Bagepalli Apr 27 '17 at 12:18
  • What is the ownership of eveything in your home directory. Particulary .Xauthority and .ICEauthority ? Are they owned by root per chance ? – hatterman Apr 27 '17 at 12:20
  • That is good to hear, but then my suggested steps should have worked. Did you make any other changes while using this funny guide? Did you get any error message while performinge the suggested steps? Maybe you share a link to the guide you used... – mook765 Apr 27 '17 at 12:20
  • It was actually an answer on the ubuntu forum, not a guide as such. I saw this and tried solution 2 and I got: -bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: Permission denied. And in this, I executed the else command and the first 10 letters were correct so I executed the 1) statement that is mentioned at the end, I get same permission denied error as earlier. – Abhijith Bagepalli Apr 27 '17 at 13:26
  • @hatterman, they are not owned by root, they are under my username – Abhijith Bagepalli Apr 27 '17 at 13:49
  • It is still a secret what you were trying to achieve and which thread from Ubuntu Forums you used. It is really hard to help if we miss relevant information. Please add more details by editing your question. – mook765 Apr 27 '17 at 15:39
  • OK, just wanted to check. I have had those files change ownership when x has ran as root, causing a login loop. Was worth checking ng – hatterman Apr 28 '17 at 09:24