user can not access USB devices

Bug #1576768 reported by Marco Righi on 2016-04-29

This bug report will be marked for expiration in 27 days if no further activity occurs. (find out why)

16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
virtualbox (Ubuntu)
Medium
Unassigned

Bug Description

Hi, a general users can not access USB devices. The root user (or sudo virtualbox) can access to USB devices. I have executed the following commands without success (the tested user is "marco"):

usermod -a -G vboxusers marco
usermod -a -G vboxsf marco

Please write me if you need more information.

PS After a successive check, I noticed that the "root" user (that I have enabled in my Ubuntu Xenial) can see the usb scanner (that requires XP drivers) but the TWAIN driver does not detect the scanner. VirtualBox show the USB scanner as attached.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: virtualbox 5.0.18-dfsg-2build1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Apr 29 17:52:31 2016
InstallationDate: Installed on 2016-04-27 (2 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: virtualbox
UpgradeStatus: No upgrade log present (probably fresh install)

Marco Righi (marco-righi) wrote :

Hi, did you try to reboot?

why do you have the guest-packages installed?

Changed in virtualbox (Ubuntu):
status: New → Incomplete
Changed in virtualbox (Ubuntu):
status: Incomplete → Confirmed
description: updated

please tell me more, which os is the host, which one is the guest, answer my previous question... and so on

Changed in virtualbox (Ubuntu):
status: Confirmed → Incomplete
Marco Righi (marco-righi) wrote :

Hi,
I have tried to reboot. The problem exists using Win7 and WinXP. I think that it is independent from the OS. By using the Oracle VM Virtuallbox manager, if I click with the mouse over the setting of a configured or UNCOFIGURED virtual machine I do not see USB devices. With unconfigured I intend that I have created the VM but I have not installed the OS.

Summarizing, if the VM Virtuallbox manager (in Italian Oracle VM Virtualbox Gestore) on a new VM machine (only created) does not see the USB devices it is not a problem of the OS. Using default Ubuntu Packages, I have installed the packages "VNC" and "Oracle VM VirtualBox Extension PAck".

Hi Marco, thanks for the information, but you didn't provide the requested information

Marco Righi (marco-righi) wrote :

> Hi, did you try to reboot?
yes

> why do you have the guest-packages installed?
It was a mistake, uninstalled

> please tell me more, which os is the host, which one is the guest, answer my previous question... and so on

HOST
Command 2001 of 4 $lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial

the error is independent from the guest OS (see attachment).

This is a from-scratch Ubuntu xenial installation. I have formatted the disk that contained Ubuntu 14.04 LTS. Ubuntu 14.04 executed VirtualBox perfeclty.

Please write me to get more information to resolve the bug.

The

mmm ok, so the same stuff worked on 14.04 but not on 16.04, and seems to affect only host, because with no guest installed you can't even see (some/all) devices.

lets try:
sudo ls -l /dev/vbox*

try
virtualbox from bash, and look if anything is printed during the startup/run

also, without checking virtual machines: open virtualbox, click settings, and tell me what is printed (screenshot is fine) on the usb section.

this should be enough to troubleshoot permission issues:

the next step might be to download virtualbox from oracle website, and see if the issue is debian/ubuntu packaging specific or not.
(please don't do this right now, you need to purge your current virtualbox, and I don't think it will fix the issue)

Marco Righi (marco-righi) wrote :

-1-
Command 1998 of 1 $sudo ls -l /dev/vbox*
[sudo] password di marco:
crw------- 1 root root 10, 55 mag 3 10:50 /dev/vboxdrv
crw------- 1 root root 10, 54 mag 3 10:50 /dev/vboxdrvu
crw------- 1 root root 10, 53 mag 3 10:50 /dev/vboxnetctl

-2-
executing from bash I have no output

Command 1999 of 2 $virtualbox
[cheched USB devices from command line]
Command 2000 of 3 $

Screenshot attached.

I have installed VirtualBox using the repository

deb http://download.virtualbox.org/virtualbox/debian xenial contrib

and the problem is still here! Sigh!

On my home-computer (now I am using the work-computer) I have the same problem. I have enabled root password, I have copied virtualBox configuration in /root directory and I have verified that I can see the attached usb devices.

After that I have tried to use an old USB A3 scanner that can be used only with WinXP. When I tried to use the scanner the OS XP answered me that the OS can not find the scanner (the scanner is available in the list of the Virtualbox connected USB devices ).

I think that the problem is not in permission values, it could be a problem of the new kernel.

Are you suggestin

no, the problem is in permissions.

crw-rw-rw- 1 root root 10, 55 mag 2 15:59 /dev/vboxdrvu

this is what it should be.

please remove the official virtualbox-5.0 --purge
and then
sudo chmod 666 /dev/vboxdrvu

and let me know if it works.

Marco Righi (marco-righi) wrote :

No changes, the chmod does not resolve the problem. As I wrote, I have run VirtualBox as "root". the root user can access to the USB devices but it can not use them. VurtualBox on Ubuntu16 runs correctly.

Marco Righi (marco-righi) wrote :

After a dist-upgrade using "-proposed" the root can use the USB devices. I tried chmod 666 /dev/vboxdrvu and the user can not still use USB devices.

I am exploring the /dev but I would wait some comments before provide chmod 666 to these files (and moreover after each reboot the files came-back to the original permission settings!)

(1)

User:root Computer:i7 Base:dev Current:/dev
Command 1382 of 7 #ll vbox* -r
0 crw------- 1 root root 10, 53 mag 5 00:53 vboxnetctl
0 crw-rw-rw- 1 root root 10, 54 mag 5 00:53 vboxdrvu
0 crw------- 1 root root 10, 55 mag 5 00:53 vboxdrv

vboxusb:
totale 0
0 drwxr-x--- 2 root vboxusers 220 mag 5 00:53 003

(2)
User:root Computer:i7 Base:dev Current:/dev
Command 1382 of 8 #ll vboxusb/003/0* -r
0 crw-rw---- 1 root vboxusers 189, 268 mag 5 00:53 vboxusb/003/013
0 crw-rw---- 1 root vboxusers 189, 267 mag 5 01:04 vboxusb/003/012
0 crw-rw---- 1 root vboxusers 189, 266 mag 5 00:53 vboxusb/003/011
0 crw-rw---- 1 root vboxusers 189, 263 mag 5 00:53 vboxusb/003/008
0 crw-rw---- 1 root vboxusers 189, 262 mag 5 00:53 vboxusb/003/007
0 crw-rw---- 1 root vboxusers 189, 261 mag 5 00:53 vboxusb/003/006
0 crw-rw---- 1 root vboxusers 189, 260 mag 5 00:53 vboxusb/003/005
0 crw-rw---- 1 root vboxusers 189, 259 mag 5 00:53 vboxusb/003/004
0 crw-rw---- 1 root vboxusers 189, 257 mag 5 00:53 vboxusb/003/002

Changed in virtualbox (Ubuntu):
status: Incomplete → New

Hi Marco,

can you please check if you have the same issue?
https://www.virtualbox.org/pipermail/vbox-dev/2016-May/013828.html

    Il Lunedì 9 Maggio 2016 14:00, Marco Righi <email address hidden> ha scritto:

 ** Changed in: virtualbox (Ubuntu)
      Status: Incomplete => New

--
You received this bug notification because you are subscribed to
virtualbox in Ubuntu.
https://bugs.launchpad.net/bugs/1576768

Title:
  user can not access USB devices

Status in virtualbox package in Ubuntu:
  New

Bug description:
  Hi, a general users can not access USB devices. The root user (or sudo
  virtualbox) can access to USB devices. I have executed the following
  commands without success (the tested user is "marco"):

  usermod -a -G vboxusers marco
  usermod -a -G vboxsf marco

  Please write me if you need more information.

  PS After a successive check, I noticed that the "root" user  (that I
  have enabled in my Ubuntu Xenial)  can see the usb scanner (that
  requires XP drivers) but the TWAIN driver does not detect the scanner.
  VirtualBox show the USB scanner as attached.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: virtualbox 5.0.18-dfsg-2build1
  ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
  Uname: Linux 4.4.0-21-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Apr 29 17:52:31 2016
  InstallationDate: Installed on 2016-04-27 (2 days ago)
  InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
  SourcePackage: virtualbox
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1576768/+subscriptions

Marco Righi (marco-righi) wrote :

Hi, I think that the problem is a little bit different. After some tests perhaps it is a problem related to the permissions of the file. The problem is present before that the OS is executed. I attach a screenshot that shows the problem and VBox.log.

Even if the screenshot shows you that are not present attached devices, there are some USB attached devices! VirtualBox can not access to some /dev or something else and do not show the attached devices!

Please write me ifd I can provide you more information, I really would like to resolve this problem!

Marco Righi (marco-righi) wrote :

the VBox.log is attached here!

can you please try 5.0.20 from my ppa
https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/virtualbox-ppa
and if it doesn't fix the issue, remove it and install the official deb file from here?
http://download.virtualbox.org/virtualbox/5.0.20

I have no clues left.

Marco Righi (marco-righi) wrote :

the test failed. VB 5.0.20 does not fix the bug. How many users have this bug?

Marco Righi (marco-righi) wrote :

It should be a permission bug: some /dev files do not have dialout group.

you are the first one having that bug. and BTW, "/dev" is usually populated by the kernel, so I'm really not sure about why you should have different configuration there.

please consider asking upstream, at least to have a more verbose error message

Andrey Sidorov (andrey-desman) wrote :

See this issue as well:

$ groups
andrey_sidorov adm dialout cdrom sudo dip plugdev lpadmin sambashare docker wireshark vboxusers

$ ls -l /dev/vboxusb/003/
total 0
crw-rw---- 1 root vboxusers 189, 257 окт 9 13:11 002
crw-rw---- 1 root vboxusers 189, 258 окт 9 13:11 003
crw-rw---- 1 root vboxusers 189, 259 окт 9 13:11 004
crw-rw---- 1 root vboxusers 189, 262 окт 13 15:46 007

$ VBoxManage list usbhost
Host USB Devices:

<none>

$ sudo VBoxManage list usbhost
Host USB Devices:

UUID: d1f185b4-b9d0-4c7c-87cc-681ee61883bc
VendorId: 0x045e (045E)
ProductId: 0x07b9 (07B9)
Revision: 1.20 (0120)
Port: 5
USB version/speed: 2/Low
Manufacturer: LITEON Technology
Product: USB Keyboard
Address: sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb3/3-6//device:/dev/vboxusb/003/003
Current State: Busy

[etc...]

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

$ VBoxManage -v
5.0.24_Ubuntur108355

$ VBoxManage list extpacks
Extension Packs: 2
Pack no. 0: VNC
Version: 5.0.24
Revision: 108355
Edition:
Description: VNC plugin module
VRDE Module: VBoxVNC
Usable: true
Why unusable:

Pack no. 1: Oracle VM VirtualBox Extension Pack
Version: 5.0.24
Revision: 108355
Edition:
Description: USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:

Andrey Sidorov (andrey-desman) wrote :

Ok, so the problem for me is the exhausting of inotify watches.
See https://phobosk.wordpress.com/2012/11/11/howto-fix-a-virtualbox-failed-to-access-the-usb-subsystem-error/

VBoxSVC strace out:
24511 inotify_add_watch(10, "/dev/vboxusb", IN_MODIFY|IN_ATTRIB|IN_CREATE|IN_DELETE) = -1 ENOSPC (No space left on device)

Fixed by increasing the limits.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in virtualbox (Ubuntu):
status: New → Confirmed
Changed in virtualbox (Ubuntu):
importance: Undecided → Medium

Hello everyone,

I seem to be having the same issue here, at least symptom wise. No usb devices detected by the virtualbox host, but usb devices are properly detected by ubutnu. See Virtualbox log file attached and additional information below. My user is a member of the virtualbox group.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

$ dpkg -l | grep virtualbox
ii virtualbox 5.2.18-dfsg-2~ubuntu18.04.3 amd64 x86 virtualization solution - base binaries
ii virtualbox-dkms 5.2.18-dfsg-2~ubuntu18.04.3 all x86 virtualization solution - kernel module sources for dkms
ii virtualbox-ext-pack 5.2.18-1~ubuntu18.04.1 all extra capabilities for VirtualBox, downloader.
ii virtualbox-guest-additions-iso 5.2.18-1~ubuntu18.04.1 all guest additions iso image for VirtualBox
ii virtualbox-qt 5.2.18-dfsg-2~ubuntu18.04.3 amd64 x86 virtualization solution - Qt based user interface

Any advice or additional information to be provided?

Cheers,

Bernd

@kalbfuss please read all the messages, and if nothing fixes the issue, open a new one!

Changed in virtualbox (Ubuntu):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers