Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87892 - Bad permissions don't let eclipse install new features
Summary: Bad permissions don't let eclipse install new features
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Development Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-04 05:00 UTC by Abraham Marin Perez
Modified: 2006-08-28 08:27 UTC (History)
3 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 Abraham Marin Perez 2005-04-04 05:00:07 UTC
New features installed through Eclipse's Update Manger are by defult located on /usr/lib/eclipse-3/features and /usr/lib/eclipse-3/plugins; however, these files can only be written by root, so one has to install new plugins on different directories or run eclipse as root, would it be safe to set 777 permissions just to these directories in order to make everyone able to install new features?

Reproducible: Always
Steps to Reproduce:
1. Go to Update Manager (Eclipse-2.*) or Fin and Install (Eclipse-3.*)
2. Try to install any new plugin or feature
3.




Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r1,
2.6.7-gentoo-r12 i686)
=================================================================
System uname: 2.6.7-gentoo-r12 i686 AMD Athlon(tm)
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 24 2005, 18:47:09)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r1, 2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe -march=athlon-xp -fomit-frame-pointer -fforce-addr
-frerun-loop-opt -floop-optimize -frerun-cse-after-loop -falign-functions=4"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=athlon-xp -fomit-frame-pointer -fforce-addr
-frerun-loop-opt -floop-optimize -frerun-cse-after-loop -falign-functions=4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://linuv.uv.es/mirror/gentoo
ftp://ftp.rediris.es/pub/linux/distributions/gentoo
ftp://ftp.gentoo-pt.org/pub/gentoo/ ftp://mir.zyrianes.net/gentoo/
ftp://ftp.caliu.info/pub/gentoo/ http://mir.zyrianes.net/gentoo/"
LANG="es_ES.UTF-8@euro"
LC_ALL="es_ES.UTF-8@euro"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X aalib acpi alsa apache2 audiofile avi bidi bitmap-fonts bzlib
calendar canna cdr cjk crypt cscope curl dga directfb divx4linux doc dvb emboss
encode esd evo exif fam fbcon fftw firebird flac font-server fortran freewmn ftp
gb gcj gd gdbm gif gnome gtk gtk2 gtkhtml iconv icq imagemagick imlib iodbc
jabber java jikes jpeg libg++ libwww mad memlimit mikmod mime mmx motif mozilla
mp3 mpeg msn nas ncurses nls nptl odbc offensive oggvorbis openal opengl pam
pcre pdflib perl png pnp posix python quicktime readline sdl shared sharedmem
simplexml slang spell ssl svg svga sysvipc szip tcltk tcpd tetex theora tiff
truetype truetype-fonts type1-fonts unicode usb videos wmf x86 xinerama xml xml2
xmlrpc xmms xv xvid zlib linguas_es linguas_en linguas_ja"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Jan Brinkmann (RETIRED) gentoo-dev 2005-04-04 07:43:30 UTC
eclipse belongs to dev-tools
Comment 2 Abraham Marin Perez 2005-04-04 08:06:16 UTC
In the examples above I used directories for eclipse-3, but same happens to eclipse-2.
Comment 3 z4 2005-06-09 12:21:54 UTC
(In reply to comment #0)
I would not recommend to change permissions of any directories.
Would be better to run Eclipses Update Manager as root or (if possibly) use
portage to keep your plugins up to date. 
Comment 4 Thomas Matthijs (RETIRED) gentoo-dev 2005-06-09 12:38:10 UTC
changing the permissions or running eclipse as root is a bad idea
a better way would be to add a default update site in $HOME, which i'm told is 
possible.
Comment 5 Abraham Marin Perez 2005-06-09 14:35:48 UTC
I agree running Eclipse as root isn't a good idea and I don't think using
portage's tree would be helpful since it would require a new ebuild for every
available plug-in: the needed process to include a new ebuild in portage's tree
may take some while, and managing it oneself would mean loosing it at every
sync. I like portage's system, that's why I use Gentoo, but I think we shouldn't
overload it whith plug-ins that could be managed fromt he application itself.

I like the idea of using $HOME as the directory to where install plug-ins, but I
guess it's a potential problem in a system with quotas.
Comment 6 Steve Arnold archtester gentoo-dev 2005-06-09 19:55:39 UTC
Seems like it might be a job for sudo, along with the right perms on the eclipse 
directories.  I was thinking maybe an eclipse group with group perms, along with 
the appropriate sudo command(s).  Others are much better with permissions than I 
(me science geek) so what do you all think?
Comment 7 Abraham Marin Perez 2005-06-11 05:58:33 UTC
I think using sudo it's a good idea... A dependency should be added to eclipse
but it will fix permissions problems while keeping files and directories in
their right place. Futhermore, I think this solution may be extrapolated to
other applications with similar problems, like Firefox and search engines, etc.

What do developers think about it?
Comment 8 Christopher G. Stach II 2005-06-30 07:45:10 UTC
Don't change any perms (certainly not to 0777!)  Don't run anything as root, 
ever.  That's just asking for trouble, and you usually get it.

I just install the plugins into my home directory (~/eclipse or .eclipse), 
which is what everyone should probably do.  If you have a quota and you run 
out, get a bigger one.  If you install plugins as root, everyone will be 
subject to them, and they are very often broken.  If other system users don't 
use those plugins, they will hurt them by wasting memory and whatever else the 
plugin happens to do that you don't need.
Comment 9 Philip H. Smith 2005-11-28 00:27:31 UTC
(In reply to comment #6)
> Seems like it might be a job for sudo, along with the right perms on the eclipse 
> directories.  I was thinking maybe an eclipse group with group perms, along with 
> the appropriate sudo command(s).  Others are much better with permissions than I 
> (me science geek) so what do you all think?

I'm doing this but skipping sudo;  instead just create the group and add myself
to it, change group of /usr/lib/eclipse-3 & subdirs, set group writable.
Comment 10 Thomas Matthijs (RETIRED) gentoo-dev 2005-11-28 00:53:55 UTC
You should create an eclipse extention dir inside your $HOME
and have it install there

It's not a good idea to run it as root
Comment 11 Dominik Stadler (RETIRED) gentoo-dev 2006-04-23 09:00:46 UTC
Short question: how do I add a different location for Eclipse plugins? Couldn't find it, the dialog in the update-manager doesn't allow me to add locations...
Comment 12 Abraham Marin Perez 2006-04-24 03:12:46 UTC
(In reply to comment #11)
> Short question: how do I add a different location for Eclipse plugins? Couldn't
> find it, the dialog in the update-manager doesn't allow me to add locations...
> 

It is possible to do such a thing, but it's true that it isn't like a permanent configuration issue whatsoever. When you are installing a new plugin and you have already gone through the first "preparation" steps (selecting/adding the remote site, chosing version, accepting license, etc.) you'll arrive at the "install location" window; there you can choose one of the default installation sites or specify a new installation site.

Press the "add site" button, choose a  directory for your plugins and you'll be done. From now on, the installation site you created will appear once you are in this window, so you'll be able to install all your plugins there.

HTH
Comment 13 Mike Auty (RETIRED) gentoo-dev 2006-08-28 07:36:48 UTC
The Eclipse-3.2 sdk allows you to install plugins locally.  Is that an ok resolution to this bug?
Comment 14 Christopher G. Stach II 2006-08-28 07:50:11 UTC
Yes.  This really isn't a bug at all.
Comment 15 Abraham Marin Perez 2006-08-28 08:04:35 UTC
(In reply to comment #14)
> Yes.  This really isn't a bug at all.
> 

Well, it WAS a bug the day it was reported, don't be confused by the fact that after more than one year messing around with this topic the solution seems quite clear.

Now, if no one disagrees, I'll mark this bug as fixed.
Comment 16 Christopher G. Stach II 2006-08-28 08:09:11 UTC
This "bug" had the exact same solution back then, as I posted on 2005-06-30. :)
Comment 17 Abraham Marin Perez 2006-08-28 08:27:54 UTC
(In reply to comment #16)
> This "bug" had the exact same solution back then, as I posted on 2005-06-30. :)
> 

Yes, that's totally true, although you didn't really say how to fix this problem; you mentioned the solution, but forgot to say how to apply it ;-). Proof of this is that on 2006-04-23 people were still working on that (see comment #11).

Anyhow, the good news are that now the whole thing is over and everyone will be able to install new feauters through Eclipse's Update Manager flawlessly. And that's good for all us, isn't it? :)