Score:0

I accidentally changed persmissions to /usr/local

eg flag

I have been installing android studio, I download it from the homepage here.

I follow the instructions here, But I can't unzip the tar.gz file here, because I don't have permissions, and I did it with sudo:

$ cd /usr/local
$ sudo mv ~/Downloads/android-studio-2020.3.1.25-linux.tar.gz .
$ sudo tar -xvzf android-studio-2020.3.1.25-linux.tar.gz

and now I must do sudo ls when I don't need previously, or I can't use docker-compose because it's in /usr/local/bin

I don't know which permissions it has originally, and I don't know if I must only change the /usr/local ones or made some recursive action.

$ sudo ls -latr /usr/local
sudo ls -latr /usr/local/
total 44
drwxrwxr-x  7 root root 4096 ene  1  2010 android-studio
drwxr-xr-x  2 root root 4096 jun  8  2018 src
drwxr-xr-x  2 root root 4096 jun  8  2018 sbin
drwxr-xr-x  2 root root 4096 jun  8  2018 include
drwxr-xr-x  2 root root 4096 jun  8  2018 games
drwxr-xr-x  2 root root 4096 jun  8  2018 etc
drwxr-xr-x  7 root root 4096 jun  8  2018 share
lrwxrwxrwx  1 root root    9 dic 23  2020 man -> share/man
drwxr-xr-x  2 root root 4096 oct 27 12:06 bin
drwxr-xr-x  7 root root 4096 oct 29 10:23 lib
drwxr-xr-x 13 root root 4096 nov 15 16:47 ..
drwx------ 11 root root 4096 nov 15 17:11 .
vanadium avatar
cn flag
Not clear if and how you changed the permissions in the first place. Not clear from your output that you cannot unzip the tar. In other words: the question is very unclear.
hr flag
`drwx------ 11 root root 4096 nov 15 17:11 .` suggests you somehow removed group and other permissions on `/usr/local` itself (normally it should be `drwxr-xr-x`)
user13182570 avatar
eg flag
Ok, my computer is broken now, I will need some time to repair it. In the meantime, is it normal to change folder permissions if you unzip a compressed file into a directory?
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.