View previous topic :: View next topic |
Author |
Message |
alogim Tux's lil' helper
Joined: 21 Aug 2015 Posts: 131
|
Posted: Sun Jan 07, 2018 8:26 pm Post subject: Unable to start Android Studio |
|
|
I just installed Android Studio via Code: | sudo emerge -av dev-util/android-studio
|
However, when I try to start it, either via the installed desktop shortcut or via the android-studio command as normal user, a window opens and tells me the following: Code: | Temp directory '/home/michael/.AndroidStudio3.0/system/tmp' is inaccessible.
If you have modified the 'idea.system.path' property please make sure it is correct,
otherwise please re-install the IDE.
Details: IOException: Cannot run program "/home/michael/.AndroidStudio3.0/system/tmp/idea_tmp_check.sh": error=13, Permission denied |
However, the directory /home/michael/.AndroidStudio3.0/system/tmp/ exists and the permissions are completely right. The only way to start it is via sudo. Any idea why? _________________ Desktop: Gigabyte X670E Aorus Master - 7950X3D - 2x16 GB - Sapphire RX 7900XTX Vapor-X - 1 TB MP700 - be quiet! 800 FX - Samsung Odyssey Ark 55"
Phone: Samsung Galaxy S22 Ultra - 256 GB - 12 GB |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Sun Jan 07, 2018 8:39 pm Post subject: |
|
|
What are the permissions and ownership on that directory and its ancestors? How does Android Studio invoke its temporary checker? When you start via sudo, does it use that tmp or a different one? What are the mount options for the filesystem that contains that directory?
As an aside, it seems very questionable to me to be expecting a temporary directory to permit executing scripts. Disallowing that has been standard security practice for years. |
|
Back to top |
|
|
alogim Tux's lil' helper
Joined: 21 Aug 2015 Posts: 131
|
Posted: Sun Jan 07, 2018 8:48 pm Post subject: |
|
|
Hu wrote: | What are the permissions and ownership on that directory and its ancestors? |
Code: | drwxr-xr-x 4 michael michael 4096 Jan 7 20:15 .AndroidStudio3.0 |
Hu wrote: | How does Android Studio invoke its temporary checker? |
I have no idea.
Hu wrote: | When you start via sudo, does it use that tmp or a different one? |
It uses /root/.AndroidStudio3.0/system/tmp and everything works fine.
Hu wrote: | What are the mount options for the filesystem that contains that directory? |
Code: | /dev/sda3 /home ext4 defaults,noatime,noexec 0 0 |
_________________ Desktop: Gigabyte X670E Aorus Master - 7950X3D - 2x16 GB - Sapphire RX 7900XTX Vapor-X - 1 TB MP700 - be quiet! 800 FX - Samsung Odyssey Ark 55"
Phone: Samsung Galaxy S22 Ultra - 256 GB - 12 GB |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Sun Jan 07, 2018 10:08 pm Post subject: |
|
|
You omitted the ancestor directories (showing only the immediate parent), but you did show the problem. This is a bug in Android Studio. It is trying to run code in a directory that is rightly noexec (but wrongly not nodev, though that is for the truly paranoid; noexec covers your most likely problem scenarios), then is surprised when that noexec blocks it from running. You may be able to work around this by setting some environment variable or other parameter to point it to an executable directory. Otherwise, you will need to patch it not to run code in temporary directories. |
|
Back to top |
|
|
|