Ubuntu – Owner of /usr/lib is not root

chownownershippermissionsrootvirtualbox

Virtualbox program error:

Failed to open a session for the virtual machine …. Failed to load
VMMR0.r0 (VERR_SUPLIB_OWNER_NOT_ROOT).

Terminal output:

balazs@inspiron:/usr$ ls -l
total 164
drwxr-xr-x   2 root   root   69632 Oct 12 12:27 bin
drwxr-xr-x   2 root   root    4096 Apr 24 19:04 games
drwxr-xr-x  81 root   root   12288 Sep 29 11:57 include
drwxr-xr-x 200 balazs balazs 36864 Oct 12 12:27 lib
drwxr-xr-x   4 root   root    4096 May 23 10:43 lib32
drwxr-xr-x  12 root   root    4096 Oct  3 14:02 local
drwxr-xr-x   2 root   root   12288 Oct 10 19:17 sbin
drwxr-xr-x 337 root   root   12288 Oct 12 12:27 share
drwxr-xr-x  11 root   root    4096 Oct 12 12:27 src

I didn't changed anything. Maybe some other installed software screwed things up. But I think /usr/lib should be owned by root.
Inside the folder everything is owned by root.

balazs@inspiron:/usr/lib$ ls -l | less
total 196232
drwxr-xr-x  2 root   root         4096 Apr 24 19:03 accountsservice
drwxr-xr-x  7 root   root         4096 Jul 16 12:49 ADM_plugins
drwxr-xr-x  3 root   root         4096 Apr 24 19:04 aisleriot
drwxr-xr-x  2 root   root         4096 Apr 24 19:04 apg
drwxr-xr-x  2 root   root         4096 May 28 01:50 apr-util-1
drwxr-xr-x  4 root   root         4096 Apr 24 19:02 apt
drwxr-xr-x  2 root   root        12288 Apr 24 19:03 aspell
drwxr-xr-x  2 root   root         4096 Apr 24 19:03 at-spi2-core
-rw-r--r--  1 root   root        34512 Jul 11 07:51 attica_kde.so
drwxr-xr-x  2 root   root         4096 Apr 24 19:04 avahi

How should I fix this ?

I fear I'll break my OS. I did sudo chown on that folder once and I had to reinstall everyting because sudo wasn't owned by root etc. ( a year ago ) I decided not to use Virtualbox, but now I need it.
Any help?

Best Answer

Use chown to change the owner:

sudo chown root:root /usr/lib

This will change the owner of /usr/lib directory to root.

Related Question