Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 283617

Summary: virtualbox-bin-3.0.4 fails to start: "Effective UID is not root"
Product: Gentoo Linux Reporter: Stefan Kiesler <heavymetal>
Component: [OLD] UnspecifiedAssignee: Patrick Lauer <patrick>
Status: RESOLVED CANTFIX    
Severity: normal CC: bbutscheidt, hkmaly, jokey, patrick, polynomial-c, swapon
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Stefan Kiesler 2009-09-03 21:34:46 UTC
As virtualbox-bin-1.6.6 has been broken for months now (why is it still marked stable, btw?), I tried to switch to current 3.0.4, but it won't start.

I get the following error:

"VirtualBox: Error -10 in SUPR3HardenedMain!
VirtualBox: Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100)
VirtualBox: Tip! It may help to reinstall VirtualBox."

emerge --info:

Portage 2.1.6.13 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-1.12.11.1
Timestamp of tree: Thu, 03 Sep 2009 03:45:03 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ ftp://91.121.125.139/gentoo-distfiles/ http://91.121.124.139/gentoo-distfiles/ http://gentoo.mirror.web4u.cz/"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages/knut"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac aalib acpi alsa amd64 berkdb branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dts dvd dvdr dvdread eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gif glut gpm gstreamer gtk gtkhtml hal iconv imagemagick ipv6 isdnlog jack java java6 joystick jpeg jpeg2k kde ladspa ldap libnotify libsamplerate lm_sensors mad mikmod mmx mng mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nsplugin ogg openal opengl openmp pam pcre pdf perl phonon png pppd python qt3 qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd threads thunar tidy tiff tk truetype usb v4l vcd vorbis x264 xine xinerama xml xml2 xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Joerg Bornkessel gentoo-dev 2009-09-15 18:48:12 UTC
any solutions?
I have the same prob after update from virtualbox-bin-3.0.4 to 3.0.6
Comment 2 Joerg Bornkessel gentoo-dev 2009-09-19 18:10:28 UTC
I am found some help in this tread

http://forums.virtualbox.org/viewtopic.php?t=11154

A simple

chmod 4711 /opt/VirtualBox/VirtualBox

fixed the probs on my VirtualBox install.
Comment 3 Stefan Kiesler 2009-10-05 08:04:15 UTC
Problem persists with 3.0.6.
The ebuild fails to suid root the VirtualBox binaries in some cases:

for each in VBox{SDL,Headless} VirtualBox; do
  fowners root:vboxusers /opt/VirtualBox/${each}
  fperms 4510 /opt/VirtualBox/${each}
  pax-mark -m "${D}"/opt/VirtualBox/${each}
done

However, my permissions looked like this on 3.0.4 (and 3.0.6):

drwxr-xr-x 2 root root          4096  3. Sep 21:52 accessible 
drwxr-xr-x 2 root root          4096  3. Sep 21:52 additions 
drwxr-xr-x 2 root root          4096  3. Sep 21:52 components 
-rwxr-x--- 1 root vboxusers   434104  3. Sep 21:50 kchmviewer 
-rw-r--r-- 1 root root       3022312  3. Sep 21:50 libQtCoreVBox.so.4 
-rw-r--r-- 1 root root      10670024  3. Sep 21:50 libQtGuiVBox.so.4 
-rw-r--r-- 1 root root        912056  3. Sep 21:50 libQtNetworkVBox.so.4 
-rw-r--r-- 1 root root         15324  3. Sep 21:50 License-7.html 
drwxr-xr-x 2 root root          4096  3. Sep 21:52 nls 
drwxr-xr-x 4 root root          4096  3. Sep 21:52 sdk 
-rw-r--r-- 1 root root       4188827  3. Sep 21:50 UserManual.pdf 
-rw-r--r-- 1 root root        140408  3. Sep 21:50 VBoxDbg.so 
-rw-r--r-- 1 root root         14340  3. Sep 21:51 VBoxDD2GC.gc 
-rw-r--r-- 1 root root         21120  3. Sep 21:51 VBoxDD2R0.r0 
-rw-r--r-- 1 root root        178392  3. Sep 21:50 VBoxDD2.so 
-rw-r--r-- 1 root root         91964  3. Sep 21:51 VBoxDDGC.gc 
-rw-r--r-- 1 root root        124744  3. Sep 21:51 VBoxDDR0.r0 
-rw-r--r-- 1 root root       1906480  3. Sep 21:50 VBoxDD.so 
-rw-r--r-- 1 root root        170328  3. Sep 21:50 VBoxDDU.so 
-rw-r--r-- 1 root root         33656  3. Sep 21:50 VBoxGuestPropSvc.so 
-r-x--x--- 1 root vboxusers    21720  3. Sep 21:51 VBoxHeadless 
-rw-r--r-- 1 root root         72448  3. Sep 21:50 VBoxHeadless.so 
-rw-r--r-- 1 root root         62456  3. Sep 21:50 VBoxKeyboard.so 
-rwxr-x--- 1 root vboxusers   693928  3. Sep 21:51 VBoxManage 
-rws--x--- 1 root vboxusers     8392  3. Sep 21:51 VBoxNetAdpCtl 
-rwxr-x--- 1 root vboxusers    21720  3. Sep 21:51 VBoxNetDHCP 
-rw-r--r-- 1 root root         40744  3. Sep 21:51 VBoxNetDHCP.so 
-rw-r--r-- 1 root root        134592  3. Sep 21:51 VBoxOGLhostcrutil.so 
-rw-r--r-- 1 root root        144504  3. Sep 21:51 VBoxOGLhosterrorspu.so 
-rw-r--r-- 1 root root        144576  3. Sep 21:51 VBoxOGLrenderspu.so 
-rw-r--r-- 1 root root        239744  3. Sep 21:51 VBoxPython2_3.so 
-rw-r--r-- 1 root root        239744  3. Sep 21:51 VBoxPython2_4.so 
-rw-r--r-- 1 root root        239776  3. Sep 21:51 VBoxPython2_5.so 
-rw-r--r-- 1 root root        239776  3. Sep 21:51 VBoxPython2_6.so 
-rw-r--r-- 1 root root        239744  3. Sep 21:51 VBoxPython.so 
-rw-r--r-- 1 root root        657360  3. Sep 21:51 VBoxREM.so 
-rw-r--r-- 1 root root       3158736  3. Sep 21:51 VBoxRT.so 
-r-x--x--- 1 root vboxusers    21712  3. Sep 21:51 VBoxSDL 
-rw-r--r-- 1 root root        172624  3. Sep 21:51 VBoxSDL.so 
-rw-r--r-- 1 root root        329936  3. Sep 21:51 VBoxSettings.so 
-rwxr-x--- 1 root vboxusers     2817  3. Sep 21:51 VBox.sh 
-rw-r--r-- 1 root root         42392  3. Sep 21:51 VBoxSharedClipboard.so 
-rw-r--r-- 1 root root        734592  3. Sep 21:51 VBoxSharedCrOpenGL.so 
-rw-r--r-- 1 root root         36376  3. Sep 21:51 VBoxSharedFolders.so 
-rwxr-x--- 1 root vboxusers  2278448  3. Sep 21:51 VBoxSVC 
-rwxr-x--- 1 root vboxusers    48240  3. Sep 21:51 VBoxTestOGL 
-rwxr-x--- 1 root vboxusers     7808  3. Sep 21:51 VBoxTunctl 
-rw-r--r-- 1 root root       1367664  3. Sep 21:51 VBoxVMM.so 
-rw-r--r-- 1 root root        223944  3. Sep 21:51 VBoxVRDP.so 
-rw-r--r-- 1 root root         24560  3. Sep 21:51 VBoxXPCOMC.so 
-rwxr-x--- 1 root vboxusers    29248  3. Sep 21:51 VBoxXPCOMIPCD 
-rw-r--r-- 1 root root       1448080  3. Sep 21:51 VBoxXPCOM.so 
-r-x--x--- 1 root vboxusers    23776  3. Sep 21:51 VirtualBox 
-rw-r--r-- 1 root root       3098011  3. Sep 21:50 VirtualBox.chm 
-rw-r--r-- 1 root root       4071136  3. Sep 21:51 VirtualBox.so 
-rw-r--r-- 1 root root        406172  3. Sep 21:51 VMMGC.gc 
-rw-r--r-- 1 root root        584520  3. Sep 21:51 VMMR0.r0 
-rw-r--r-- 1 root root          7848  3. Sep 21:51 VRDPAuth.so

The ebuild should set access rights for VBoxNetAdpCtl to 4750, but my file is 4710. VBoxSDL, VBoxHeadless and VirtualBox are set to 510 instead of 4510.

After chmodding these files manually, VirtualBox 3.0.6 is running fine. But why does the ebuild fail to set the correct permissions on some setups?
Comment 4 Patrick Lauer gentoo-dev 2009-10-05 08:25:17 UTC
>After chmodding these files manually, VirtualBox 3.0.6 is running fine. But 
>why does the ebuild fail to set the correct permissions on some setups?

I am unsure how that happens. I had suspected FEATURES="userpriv" or some other restrictive setting, but the emerge --info posted does not show that enabled, and even if enabled it shouldn't affect it. So I have no idea. Yet :)
Comment 5 Samuel Chodur, Jr. 2010-06-01 18:59:10 UTC
(In reply to comment #4)
> >After chmodding these files manually, VirtualBox 3.0.6 is running fine. But 
> >why does the ebuild fail to set the correct permissions on some setups?
> 
> I am unsure how that happens. I had suspected FEATURES="userpriv" or some other
> restrictive setting, but the emerge --info posted does not show that enabled,
> and even if enabled it shouldn't affect it. So I have no idea. Yet :)
> 

anything going on with this lately? I am using 3.2 and still cannot use VirtualBox as non-root. 
Comment 6 Karl Ernst Brunk 2010-06-25 11:59:36 UTC
Hi All out there,
 
> anything going on with this lately? I am using 3.2 and still cannot use
> VirtualBox as non-root. 

After half a year and several different tried  versions i lastly found the way out.
Easy and a bit stupid i forgotten that i have restricted the mount-options in fstab for /opt with "nosuid". So even if you change the permissions and this one is active it wont run.
noexec should produce similar restrictions.
So just proof if /opt is mounted i a right manner.
cheers
Karl
Comment 7 Lars Wendler (Polynomial-C) gentoo-dev 2010-06-29 11:48:36 UTC
What about the other people who reported the same problem here? Do you guys all mount /opt with nosuid/noexec?
Comment 8 Lars Wendler (Polynomial-C) gentoo-dev 2010-08-24 06:37:42 UTC
Okay, no response for over a month so I consider this bug being resolved. The nosuid mount appears reasonable as source of the problem and as this is a configuration done by the user it's nothing we can fix.

So resolution for now is, don't mount /opt with nosuid!
Comment 9 Bernd Butscheidt 2010-08-28 13:14:52 UTC
(In reply to comment #8)
> Okay, no response for over a month so I consider this bug being resolved. 

> What about the other people who reported the same problem here?

Just to confirm the observations:

with these mount options of the disk where /opt is linked to

/dev/hda6  /sources        reiserfs    auto,users,exec,rw,noatime      0 1

I get

VirtualBox: Error -10 in SUPR3HardenedMain!
VirtualBox: Effective UID is not root (euid=1000 egid=1000 uid=1000 gid=1000)


Adding suid to the mount options:
#/dev/hda6  /sources     reiserfs   auto,users,suid,exec,rw,noatime 0 1


VirtualBox stars as normal user.