studio.sh open permission denied for android studio in ubuntu
Solution 1
Got the same problem. But solved it by following steps:-
- Right click on studio.sh and select Properties.
- There go to Permissions.
- Check "Allow Executing file as program"
And you are done.
Solution 2
Type
sudo ./studio.sh
This should launch android studio with admin privileges. You will need to type your password, assuming you have admin privileges. If you do not have them, you need to contact whoever manages the computer.
When it launches for the first time, it will ask yo to add a shortcut so it is reachable from the GUI app menu. After that, launching android studio should not require sudo permissions.
https://askubuntu.com/questions/421389/where-to-unpack-the-android-studio-file has good recommendations of where to extract android studio to.
Solution 3
You've probably extracted it as root. Change the owner of the file to you with chown command and extract it again, or change the owner of the whole extracted content to you. Example (sudo may be required):
sudo chown yourUserName studio.sh
The other way to do it: change privileges with chmod
sudo chmod a+x studio.sh
Beware, the above one gives every registered user privileges to execute studio script.
user3519322
Updated on June 25, 2022Comments
-
user3519322 almost 2 years
I downloaded an Android Studio for linux and then tried to run the studio.sh file inside the 'bin' directory as per the instruction said. The terminal showed an error saying something like this:
bash: ./studio.sh: permission denied
The whole Studio bundle was in .tdz format and I extracted the files before accessing via the terminal. What is the main cause for such error? Thank you so much!
-
Nicolas Raoul almost 8 yearsExtracted with normal user, .sh files just lack the +x. The problem is poor packaging from Google.
-
Gaurav over 7 yearsWhen I went to permissions of
studio.sh
it said permissions ofstudio.sh
could not be determined. Any ideas how to fix that?