Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to start Android Studio
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 131

PostPosted: Sun Jan 07, 2018 8:26 pm    Post subject: Unable to start Android Studio Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21631

PostPosted: Sun Jan 07, 2018 8:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 131

PostPosted: Sun Jan 07, 2018 8:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21631

PostPosted: Sun Jan 07, 2018 10:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum