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: 89

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?
_________________
AsRock Z77 Pro4 - Intel Core i5-3570k + Cooler Master Hyper 412 SLIM - Corsair Vengeance 2x4 GiB - Sapphire Radeon HD 7950 Dual-X with Boost - 500 GB WD Caviar Black - Dell SE2717H 27" - Logitech M280 - Trust GXT 18 | OnePlus 5T 8 GB RAM + 128 GB ROM
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12802

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: 89

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

_________________
AsRock Z77 Pro4 - Intel Core i5-3570k + Cooler Master Hyper 412 SLIM - Corsair Vengeance 2x4 GiB - Sapphire Radeon HD 7950 Dual-X with Boost - 500 GB WD Caviar Black - Dell SE2717H 27" - Logitech M280 - Trust GXT 18 | OnePlus 5T 8 GB RAM + 128 GB ROM
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12802

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