Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: <janusz.kusnierek-qJ7hZgEldsRz6jiHbVrK7g <at> public.gmane.org>
Subject: Slackbuilds.org - Virtualbox Package - /dev/vboxdrvu, /dev/vboxnetctl permissions fix
Newsgroups: gmane.linux.slackware.slackbuilds.user
Date: Tuesday 16th December 2014 12:26:38 UTC (over 2 years ago)
Hello,

I'm using Your scripts for Virtualbox on Slack64_14.1 (multilib) and 
everything is ok when I'm running Headless VM environment as user root. 
But I tried to migrate to regular user. I've found one problem during 
starting VMs. You can see it in ~/.config/VirtualBox/VBoxSVC.log

---------------
00:00:00.106446 nspr-2   Failed to open "/dev/vboxdrvu", errno=13, 
rc=VERR_VM_DRIVER_NOT_ACCESSIBLE
00:01:01.636762 nspr-3   Failed to open "/dev/vboxdrvu", errno=13, 
rc=VERR_VM_DRIVER_NOT_ACCESSIBLE
00:01:01.648883 nspr-2   Failed to open "/dev/vboxdrvu", errno=13, 
rc=VERR_VM_DRIVER_NOT_ACCESSIBLE
00:01:01.824179 nspr-3   Failed to open "/dev/vboxdrvu", errno=13, 
rc=VERR_VM_DRIVER_NOT_ACCESSIBLE
00:01:28.767725 nspr-3   Failed to open "/dev/vboxdrvu", errno=13, 
rc=VERR_VM_DRIVER_NOT_ACCESSIBLE
00:01:28.778548 nspr-3   Failed to open "/dev/vboxdrvu", errno=13, 
rc=VERR_VM_DRIVER_NOT_ACCESSIBLE
00:02:11.466239 nspr-2   Failed to open "/dev/vboxdrvu", errno=13, 
rc=VERR_VM_DRIVER_NOT_ACCESSIBLE
-----------------

When we load modules using "/etc/rc.d/rc.vboxdrv start" it 
automatically creates additional devices (not only /dev/vboxdrv) with 
permissions like below using /lib/udev/rules.d/10-virtualbox.rules:

########
ls -l /dev
crw-rw---- 1 root vboxusers  10,  56 Dec 16 09:55 vboxdrv
crw------- 1 root root       10,  55 Dec 16 09:55 vboxdrvu
crw------- 1 root root       10,  54 Dec 16 09:55 vboxnetctl
########

Permissions of the /dev/vboxdrvu and /dev/vboxnetctl are too restrictive 
for regular user, so I've added another rule file called
20-virtualbox2.rules with:

------
KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="vboxusers", 
MODE="0660"
KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root",GROUP="vboxusers", 
MODE="0660"
------

And after restarting computer or /etc/rc.d/rc.vboxdrv, permissions are set
correctly and there are no more errors in users's log

########
ls -l /dev
crw-rw---- 1 root vboxusers  10,  55 Dec 16 12:20 vboxdrvu
crw-rw---- 1 root vboxusers  10,  54 Dec 16 13:23 vboxnetctl
########


Could You apply this fix (or similar) in Your scripts?
Thank You :)





-- 
Best regards
Janusz Kusnierek
 
CD: 3ms