VirtualBox Error -10

I am unable to run Oracle Virtualbox as a regular user. I am a member of vboxusers group. I get this error -

[Sat Feb 16 19:55:43 flux@flux ~] 
# VirtualBox 
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.

[Sat Feb 16 19:55:46 flux@flux ~] 
# QSettings::value: Empty key passed
QSettings::value: Empty key passed
<html><b>Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100) (rc=-10)</b><br/><br/>Please try reinstalling VirtualBox.<br><br><!--EOM-->where: SUPR3HardenedMain
what:  2
VERR_PERMISSION_DENIED (-10) - Permission denied.
</html>
KCrash: Application 'VirtualBox' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0


[Sat Feb 16 19:56:04 flux@flux ~] 
# QSocketNotifier: Invalid socket 8 and type 'Read', disabling...
Unable to start Dr. Konqi
Re-raising signal for core dump handling.

User details -

[Sat Feb 16 19:57:28 flux@flux ~] 
# id flux
uid=1000(flux) gid=100(users) groups=452(vboxusers),100(users)

The VirtualBox binary needs to have the set-user-ID bit set when compiled with hardening enabled. Same goes for VBoxHeadless, VBoxSDL, VBoxNetDHCP, VBoxNetNAT, etc. I can compile this but I don’t understand SUSE infrastructure and optimizations. How to find a template or --build-info for virtualbox binary from SUSE?

Wouldn’t you think that the Virtualization sub-forum will give you a better chance that the virtualization users/specialists would see this thread?

When you ask me, I can move it there for you.

Yeah, please move the thread to relevant sub-forum.

Will be moved to Virtualization and is CLOSED for the moment.

Moved from Applications nad open again.

The first question that has to be asked of course…
Is whether you chose to install Oracle Virtualbox for a particular reason.

VBox is available as a pre-compiled binary in an RPM package, which when installed you get VBox already set up with most common settings and if you have to do anything more, those things are relatively few and by choice (You may still need to add your User to the vobxusers group).

If you choose to install the packages from openSUSE, remove your Oracle VBox first.

TSU

I installed it from ‘Virtualization’ repo. My user is a member of vboxusers.

# id flux
uid=1000(flux) gid=100(users) groups=452(vboxusers),496(wheel),100(users)

Why Virtualization Repo, its the same Version as in Tumbleweed.
Please post:

zypper lr -d
zypper se -s virtualbox

Try removing from the wheel group, its effect is unknown to me and would possibly confer the root permissions your error is complaining about.

TSU

I added my user to wheel after this fail in order to see if it makes any difference but it didn’t work.

Okay. I’ve removed Virtualization repo after uninstalling Virtualbox.

zypper lr -d
# zypper lr -d
#  | Alias                                | Name                        | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                 
  | Service
---+--------------------------------------+-----------------------------+---------+-----------+---------+----------+--------+-------------------------------------------------------------------------------------
--+--------
 1 | NVIDIA                               | NVIDIA                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.nvidia.com/opensuse/tumbleweed                                     
  |         
 2 | http-download.opensuse.org-0f1ab5fb  | server:proxy                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/server:/proxy/openSUSE_Factory/           
  |         
 3 | http-download.opensuse.org-25894e09  | system:packagemanager       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/system:/packagemanager/openSUSE_Tumbleweed
/ |         
 4 | http-download.opensuse.org-373b59f4  | server:monitoring           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/server:/monitoring/openSUSE_Factory/      
  |         
 5 | http-download.opensuse.org-7fdf6ec2  | network:time                | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/network:/time/openSUSE_Factory/           
  |         
 6 | openSUSE-20190205-0                  | openSUSE-20190205-0         | No      | ----      | ----    |   99     | rpm-md | hd:/?device=/dev/disk/by-id/usb-SanDisk_Cruzer_Blade_200429081002E24171B4-0:0-part2 
  |         
 7 | packman.inode.at-openSUSE_Tumbleweed | Packman Repository          | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://packman.inode.at/suse/openSUSE_Tumbleweed/                                   
  |         
 8 | repo-debug                           | openSUSE-Tumbleweed-Debug   | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/debug/tumbleweed/repo/oss/                             
  |         
 9 | repo-non-oss                         | openSUSE-Tumbleweed-Non-Oss | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/non-oss/                               
  |         
10 | repo-oss                             | openSUSE-Tumbleweed-Oss     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/oss/                                   
  |         
11 | repo-source                          | openSUSE-Tumbleweed-Source  | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/source/tumbleweed/repo/oss/                            
  |         
12 | repo-update                          | openSUSE-Tumbleweed-Update  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/tumbleweed/                                     
  |        


# zypper se -s virtualbox | grep x86_64
   | python3-virtualbox             | package | 5.2.22-3.8           | **x86_64** | openSUSE-Tumbleweed-Oss
i+ | virtualbox                     | package | 5.2.22-3.8           | **x86_64** | openSUSE-Tumbleweed-Oss
   | virtualbox-devel               | package | 5.2.22-3.8           | **x86_64** | openSUSE-Tumbleweed-Oss
   | virtualbox-guest-kmp-default   | package | 5.2.22_k4.20.7_1-3.8 | **x86_64** | openSUSE-Tumbleweed-Oss
   | virtualbox-guest-tools         | package | 5.2.22-3.8           | **x86_64** | openSUSE-Tumbleweed-Oss
   | virtualbox-guest-x11           | package | 5.2.22-3.8           | **x86_64** | openSUSE-Tumbleweed-Oss
i+ | virtualbox-host-kmp-default    | package | 5.2.22_k4.20.7_1-3.8 | **x86_64** | openSUSE-Tumbleweed-Oss
i+ | virtualbox-qt                  | package | 5.2.22-441.10        | **x86_64** | (System Packages)       
v  | virtualbox-qt                  | package | 5.2.22-3.8           | **x86_64** | openSUSE-Tumbleweed-Oss
   | virtualbox-vnc                 | package | 5.2.22-3.8           | **x86_64** | openSUSE-Tumbleweed-Oss
   | virtualbox-websrv              | package | 5.2.22-3.8           | **x86_64** | openSUSE-Tumbleweed-Oss


I apologize for ugly formatting.

strace VirtualBox

SUSE Paste

Take a look at the “virtualbox-qt” package – you should only be using the version from the “openSUSE-Tumbleweed-Oss” repository …

  • Remove and then, re-install the package from the correct repository.

Be aware that, there’s also a “vboxsf” user group which allows the VirtualBox session to access shared folders …

You haven’t really mentioned if, you’ve taken the affected user out of the “wheel” group …

Been there done that but it I get same error -

[Tue Feb 19 09:58:25 flux@flux ~] 
# VirtualBox 
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.

[Tue Feb 19 09:58:42 flux@flux ~] 
# QSettings::value: Empty key passed
QSettings::value: Empty key passed
<html><b>Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100) (rc=-10)</b><br/><br/>Please try reinstalling VirtualBox.<br><br><!--EOM-->where: SUPR3HardenedMain
what:  2
VERR_PERMISSION_DENIED (-10) - Permission denied.
</html>
KCrash: Application 'VirtualBox' crashing...
KCrash: Attempting to start /usr/lib64/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0


[Tue Feb 19 09:58:50 flux@flux ~] 
# 

http://susepaste.org/85558402

What does:

zypper dup
zypper in -f virtualbox virtualbox-host-kmp-default virtualbox-qt
uname -a

You may need to do more than simply remove the Virtualbox packages, you may need to purge your system of all files related to your virtualbox install.

I use the “locate” utility to do this because it’s faster and simpler than “Find.”

If you decide to use “locate,”
Install the mlocate package

zypper in mlocate

Populate the locate database, the database updates every 24 hrs but you don’t want to wait until tomorrow for first use

updatedb

Now you can search for any name string you want, even including paths if you wish but you wouldn’t want to do that here, eg

locate virtualbox
locate vbox

If any files or folders exist with those names, remove them.
Then try re-installing VBox from the OSS again.

Remember also that when you uninstall packages, you don’t remove the configuration files, they’re preserved in case you decide to want to re-install and keep your prior settings. If your permission errors are in a config, the above should enable you to locate those files so they can also be removed so that a new install will install new, default config files.

TSU

I know locate and updatedb. I removed the dependencies and other stuff with rpmorphan and a bash loop. There are no configuration files from old VirtualBox install. Secondly, I got VMPlayer working so I think there isn’t any issue with my system.

Okay, here comes -

[Tue Feb 19 18:32:57 root@flux /home/flux] 
# zypper dup
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...
5 Problems:
Problem: problem with installed package nginx-1.15.8-125.7.x86_64
Problem: problem with installed package sshguard-2.3.1-39.2.x86_64
Problem: problem with installed package vim-plugin-nginx-1.15.8-125.7.noarch
Problem: problem with installed package virt-what-1.15-2.40.x86_64
Problem: problem with installed package xen-libs-4.12.0_02-626.17.x86_64

Problem: problem with installed package nginx-1.15.8-125.7.x86_64
 Solution 1: install nginx-1.15.8-1.4.x86_64 (with vendor change)
  obs://build.opensuse.org/Virtualization  -->  openSUSE
 Solution 2: keep obsolete nginx-1.15.8-125.7.x86_64

**Choose from above solutions by number or skip, retry or cancel [1/2/s/r/c] (c): **c

[Tue Feb 19 18:37:59 root@flux /home/flux] 
# zypper in -f virtualbox virtualbox-host-kmp-default virtualbox-qt
Loading repository data...
Reading installed packages...
Forcing installation of 'virtualbox-5.2.22-3.8.x86_64' from repository 'openSUSE-Tumbleweed-Oss'.
Forcing installation of 'virtualbox-qt-5.2.22-3.8.x86_64' from repository 'openSUSE-Tumbleweed-Oss'.
Forcing installation of 'virtualbox-host-kmp-default-5.2.22_k4.20.7_1-3.8.x86_64' from repository 'openSUSE-Tumbleweed-Oss'.
Resolving package dependencies...

The following 3 packages are going to be reinstalled:
  virtualbox virtualbox-host-kmp-default virtualbox-qt

3 packages to reinstall.
Overall download size: 20.0 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
**Continue? [y/n/...? shows all options] (y): **y
.
.
.
Additional rpm output:
setting /usr/lib/virtualbox/VBoxNetDHCP to root:vboxusers 0755. (wrong permissions 0750)                                                                                                                           
setting /usr/lib/virtualbox/VBoxNetAdpCtl to root:vboxusers 0755. (wrong permissions 0750)                                                                                                                         
setting /usr/lib/virtualbox/VBoxHeadless to root:vboxusers 0755. (wrong permissions 0750)                                                                                                                          
                                                                                                                                                                                                                   
                                                                                                                                                                                                                   
(3/3) Installing: virtualbox-qt-5.2.22-3.8.x86_64 ..........................................................................................................................................................[done]
Additional rpm output:
setting /usr/lib/virtualbox/VirtualBox to root:vboxusers 0755. (wrong permissions 0750)                                                                                                                            
setting /usr/lib/virtualbox/VBoxSDL to root:vboxusers 0755. (wrong permissions 0750)                                                                                                                               
                                                                                                                                                                                                                   
                                                                                                                                                                                                                   
Executing %posttrans scripts ...............................................................................................................................................................................[done]


[Tue Feb 19 18:40:25 flux@flux ~] 
# uname -a
Linux flux 4.20.7-1-default #1 SMP PREEMPT Thu Feb 7 07:16:45 UTC 2019 (730812f) x86_64 x86_64 x86_64 GNU/Linux

Post:

zypper ve

It doesn’t show any conflicts.

[Wed Feb 20 00:19:43 root@flux /home/flux]  
# zypper ve
Loading repository data...
Reading installed packages...

Dependencies of all installed packages are satisfied.