Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 614318 - dev-util/android-studio, dev-util/android-sdk-update-manager - permissions of folder SDK
Summary: dev-util/android-studio, dev-util/android-sdk-update-manager - permissions of...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Jason A. Donenfeld
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-30 23:24 UTC by Lagu
Modified: 2021-10-14 19:25 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lagu 2017-03-30 23:24:15 UTC
Hi all, actually when we install android-sdk-update-manager is installed in /opt, but is read-only, android studio requires can write in the folder to can works, or we can't create projects..., save the sdk in the user i think is a bad idea, because every user will need download every time the SDK(13GB), maybe some group to set the write access for android update and android studio?

Thx Cya.
Comment 1 Greg Turner 2017-04-15 01:44:23 UTC
This is a semi-fundamental problem.  You can "fix" this using xattr, for example, but it just means that regular users will be able to scribble all over portage's files, which is not how gentoo package maintenance is supposed to work.

AFAICS the "correct" solution is a painful one for the maintainers -- we might see something like this some day but I wouldn't hold my breath:

All of the SDK components should be broken out into a nice hierarchy of Gentoo ebuilds

The GUI sdk updater should be disabled and somehow tricked into thinking android studio is always up-to-date

Likewise for the NDK and AVD-manager

The various emulator mesa crashes should be resolved by de-vendoring and supplying corresponding dependencies in ebuilds.
Comment 2 Jason Zaman gentoo-dev 2017-04-19 16:58:42 UTC
the dir is already set with the "android" group tho?
did you add your user to that group?

# ls -ald /opt/android-sdk-update-manager/
drwxrwxr-x. 17 root android 18 Apr 10 19:08 /opt/android-sdk-update-manager//

# grep android /etc/group
android:x:988:jason


try something like this:
# usermod -a -G android username
then logout and back in
Comment 3 Greg Turner 2017-04-19 18:22:41 UTC
The "android group" approach will work better if your directories are sgid recursively and your umask is set to, i.e., 002.

To support a multiuser (and sometimes just a single-user) installation robustly, you'll need to use the xattr equivalent:

Gory details/tutoria:

http://brunogirin.blogspot.com/2010/03/shared-folders-in-ubuntu-with-setgid.html
http://bencane.com/2012/05/27/acl-using-access-control-lists-on-linux/
https://unix.stackexchange.com/questions/115631/getting-new-files-to-inherit-group-permissions-on-linux
https://unix.stackexchange.com/a/12847

Ultimately, I've only been able to make android studio fully work, and keep working through updates, by removing all the Gentoo packages and letting Google's installer run amok as my user account; so now I just wait resignedly for them to start mining bitcoins or whatever... :)