Score:2

Ran chmod 764 /usr folder

pk flag

I ran sudo chmod 764 /usr and then my laptop rebooted, now I can't open Ubuntu login screen anymore. Help me please.

Edit:

I solved it! Boot in recovering mode and then open root console. I wrote chmod 755 /usr and then rebooted.

HuHa avatar
es flag
Don't panic, and don't reinstall just yet; follow @jpbrain's instructions, and you should be fine. Good luck.
Score:3
ca flag

Try booting from an usb Ubuntu, mount the partition and chmod /usr to 755 for a start. Then, you will need to figure out case by case once something fails.

Good luck.

Extra info: in an almost fresh 20.04 desktop install (on a virtual machine I have)

find /usr | wc -l

gives about 177K files :-)

If you put in a bash shell file...

find /usr | while read aa; do echo $aa; stat -c "%a %n" $aa; done

you will get a list of current file perms, and you could redirect that to a file as a safe measure.

regards, JP.

HuHa avatar
es flag
Yes, as long as it was only the _directory_ `/usr` and not its content as well, it should be fine to just reset the permissions for the directory. If it was really a _recursive_ chmod, it's time for reinstalling.
mook765 avatar
cn flag
After mounting the partition, you will need to run `chmod 755 /mountpoint/usr`, do not run `chmod` on `/usr`
hr flag
At least for the non-recursive case, it's even possible to fix from a root shell in recovery mode (provided root's login shell is in `/bin` not `/usr/bin`) - just tried it with a VM
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.