Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 34309  / 3 Years ago, mon, august 30, 2021, 7:15:37

I just typed "sudo chmod 770 ." on my /usr/bin directory by mistake



[acc]:/usr/bin$ sudo chmod 770 .


Now every time i run a sudo command I get a "Permission denied" error



[acc]~$ sudo
bash: /usr/bin/sudo: Permission denied


When I open a new terminal, i get: "bash: groups: command not found"



Please help me resolve this... :(


More From » sudo

 Answers
0

You should boot from a LiveCD then do the following:




  1. Mount your Ubuntu installation by clicking on the device's icon in the file manager.

  2. Open a terminal and cd into the /usr/bin folder of that installation you mounted from above.

  3. Run this command to give all users execute permissions



    sudo chmod -R a+x .

  4. Run this command to give all users read permissions



    sudo chmod -R a+r .

  5. Run this command to remove all users (except root's) write permissions



    sudo chmod -R o-w .

  6. Reboot and see if it works.


[#29150] Wednesday, September 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
homerurhyth

Total Points: 338
Total Questions: 113
Total Answers: 105

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
;