Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 2021 18:17:44 +0000
From:      Glen Barber <gjb@freebsd.org>
To:        Mario Lobo <lobo@bsd.com.br>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: Running VirtualBox as non-root user
Message-ID:  <20210929181744.GA69504@FreeBSD.org>
In-Reply-To: <CA%2ByoEx9iL_%2BjHH1tmmt9qAQRYTxq1uO_hscx0VKZ9%2BEL=f0DOQ@mail.gmail.com>
References:  <CA%2ByoEx9iL_%2BjHH1tmmt9qAQRYTxq1uO_hscx0VKZ9%2BEL=f0DOQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 29, 2021 at 03:00:43PM -0300, Mario Lobo wrote:
> Hi;
>=20
> Here is what I've done so far:
>=20
> - Created user vbox and put it in vboxuser group
> - Went as far as chown -R vbox:vboxuser /usr/local/lib/virtualbox
> - Executables are with the SUiD bit set
> -r-s--x---  1 vbox  vboxusers     32064 Sep 21 22:18 VBoxSDL
> -r-s--x---  1 vbox  vboxusers     16064 Sep 21 22:18 VBoxNetAdpCtl
> -r-s--x---  1 vbox  vboxusers     32064 Sep 21 22:18 VBoxNetDHCP
> -r-s--x---  1 vbox  vboxusers     32064 Sep 21 22:18 VBoxNetNAT
> -r-s--s---  1 vbox  vboxusers     32352 Sep 22 17:55 VirtualBoxVM
>=20
> - Imported a test VM
> - Ran the VM as root to make sure it's working
> - started VirtualBox as user vbox, and it starts fine
>=20
> VirtualBox GUI starts fine as user vbox but when I try to start the test =
VM
> from it, I get:
>=20
> Effective UID is not root (euid=3D1001 egid=3D920 uid=3D1001 gid=3D1001) =
(rc=3D-10)
> where: SUPR3HardenedMain what: 2 VERR_PERMISSION_DENIED (-10) - Permission
> denied.
>=20
> Starting it from  VirtualBoxVM --startvm test issues the same error:
>=20
> VirtualBoxVM: Error -10 in SUPR3HardenedMain!
> VirtualBoxVM: Effective UID is not root (euid=3D1001 egid=3D920 uid=3D1001
> gid=3D1001)
> where: SUPR3HardenedMain
> what:  2
> VERR_PERMISSION_DENIED (-10) - Permission denied.
>=20
> Any pointer for anything else I should be doing or is missing?
>=20

Add your user to the vboxusers group in /etc/group.

Glen


--SLDf9lqlvOQaIe6s
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAmFUrcgACgkQAxRYpUeP
4pPtfw/8CPHx4q2lFiImauVrqE/ShumLjW0hT4ZB03uUmWgsOaNeBhyA6HzRTOz9
bmXjacqKDDFkPhRQegp5Eo4R3GpIqGVblWXLPUMEeYSIQ5hMprc2I2d6AYKi0ZYb
NIooAHqQ58bcCVrn+BR3dA7NJk6KLIdzCPGH9+Fb/7TfvC84fE93L/11tSL5If5H
nr1qbEhigG3DIPz7bt3faTf++7zkuoWCOhwKXXvVyaFD1D+FTKqhrrgeqBr7ODLh
XQCJlejW+QnYwgfkB4bMsp9ua4TUgkzkjAEYhGtMHhiKfqy0duZHnGoxMW/rXweE
FERt6EKSNjDFTSgJDkK9kgJ9GbPCAuVwkC3tXycu8dtQxGqSqemXtGkrWkBRS3nn
fNBkJF89PzjN3PVAp0OiGTlFR/SiyVp69lkS572XlYKKfu3JnvH3ipRx3L53WRJq
t7I5SaaWfVAuRBJh+JhK9AB7BDettN8W2poV2SoMseU7uNobzYpfTfHzVRDDVG98
pTfpPf5YNTDYIOzXGefTW0x903v6EaE9kYib6iquGqeb5Hxum4W44Z8aSTh/THrr
CuqkRdwSv0w6pe8xxUlowM49Uu982Iszm3K3bK4AIWB0HT9j4X8D/x9p8daC0PtF
u2wkJCFPBxg19zvTN58YYjDn+tKT/rgPlsk/09fV1JjhP2i/3LA=
=C9YU
-----END PGP SIGNATURE-----

--SLDf9lqlvOQaIe6s--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210929181744.GA69504>