0

I changed my /usr permission to read only . After that not able to perform any command.

Not event able to execute , "clear" or any other operation , nor able to login as sudo . sudo command is not found.

/usr/ now has following permission : dr--------

What can I do to get following permission back : drwxr-xr-x

I am unable to perform any operation like : vi sudo chmod clear

11
  • Why did you change it? What were you trying to do?
    – David
    Sep 14, 2021 at 8:56
  • i was trying to update my node version , for which it wanted to create a folder in bin , so I tried changing its permission and this happened. Any idea , how can I perform othrer activities and set my /usr/ permission back to previous ones ? :( Now I can't even "cd" inside /usr/ . Sep 14, 2021 at 9:02
  • Create an Ubuntu image on a USB drive. Boot from it. Then mount your / drive and try changing the permissions back.
    – Ray
    Sep 14, 2021 at 9:05
  • @Ray . This I did on an ec2 instance . How can i do that what you have suggested ? Sep 14, 2021 at 9:07
  • If it’s an EC2 instance, you’re out of luck. Terminate and recreate 😕
    – matigo
    Sep 14, 2021 at 9:10

1 Answer 1

0

When you are using instances (google cloud, aws, azure) the method to do this is:

Create a new instance, attach the old instance as a mountpoint, fix your settings on the mount point, and boot into your old instance.

2

You must log in to answer this question.

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