Quote:
Originally Posted by pramhus
I have installed virtualbox on a fedora 9 installation . I am using an XP quest . Windows XP works but I can't get the usb ports accessed under XP . How do I set the permissions for the usb ports to be available to the XP quest ? The
|
USB in Virtualbox 1.6.2 on Fedora 9.
-------------------------------------------------------
1. Make a file for starting script on boot:
su
"root password"
touсh /etc/udev/rules.d/51-usb-group.rules
with next content, filled in your favorite text editor (lets say nano /etc/udev/rules.d/51-usb-group.rules):
##########################################################################
SUBSYSTEM=="usb_device", RUN="/etc/udev/scripts/set-usb-group '%c'"
##########################################################################
2. Make a folder:
mkdir /etc/udev/scripts
and file inside:
touсh /etc/udev/scripts/set-usb-group
with next content, filled in your favorite text editor (lets say nano /etc/udev/scripts/set-usb-group):
##########################################################################
#! /bin/sh
ret=false
if [ "$1" != "" ]; then
if [ -f /proc/$1 ]; then
chgrp usb /proc/$1 && \
chmod g+rw /proc/$1 && \
logger udev/set-usb-group: `ls -l /proc/$1`
ret=true
fi
if [ -e /dev/$1 ]; then
chgrp usb /dev/$1 && \
chmod g+rw /dev/$1 && \
logger udev/set-usb-group: `ls -l /dev/$1`
ret=true
fi
else
logger udev/set-usb-group: Called without device arg
exit 0
fi
if ! $ret; then
logger udev/set-usb-group: Setting permissions on device $1 failed
fi
##########################################################################
3. Change an owner of file and attribute:
chown -v root /etc/udev/scripts/set-usb-group
chmod -v go-rwx,u+rwx /etc/udev/scripts/set-usb-group
4. Find ID of vboxusers group in User and group manager (I have 501).
Add new row to /etc/fstab
##########################################################################
# devgid=501, 501 - это номер группы vboxusers
none /proc/bus/usb usbfs devgid=501,devmode=664 0 0
##########################################################################
Do not forget to add new line.
5. Reboot.