Saturday, January 31, 2009

Linux Server

Installing SME Server

I used this some years ago for class when it was called e-smith and it was a very nice server setup that was administered from a web browser.

The test machine is a dell SFF gx270 with P4 2.6ghz, 1 gig DDR ram, 320 gig IDE hd. There is no cd so i opened the top and plugged in a cd using a long ide cable. The machine is very compact, about the size of a large 3 ring binder with 6 usb ports, low profile agp, pci etc and it has a SATA controller. We debated putting in one of the sata drives lying around but this old IDE drive should be fine. It also has an Nvidia 6600 256mb video card which is totally wasted in a server. We decided to leave the sata cable and the video card in the machine if we later need to use it as a ubuntu desktop for class.

The version we booted from cd is 7.4 and the main page for the distro is at http://wiki.contribs.org/Main_Page. This version is based on Centos.

The installation menu uses the old text config that will be familiar to anyone who grew up on red hat. You choose a language, a time zone and reformat the hard drive. It then starts installing the packages about 1.2 gig worth - 522 packages to be exact which takes about 4 minutes as the text installer flies. This gives us time to read the FAQ's.

Interesting, if you change the boot loader from grub to lilo you can run it on a mac mini (intel only). Unfortunately our mac mini is G4 so no joy there - however it is running osx server which is a very nice distro.

Done installing so we reboot. We will leave the CD connected for now in case we need it but we take out the cd-rom. The os starts up and mounts the ext3 fle system and then starts creating quota files which take a very long time. I also thought it was hung and was ready to swith to the other console.

Now some questions. We choose an administrator password. Next is the server name. Next we choose an IP address. This is a fixed one - not a dhcp. I assume we can change that later.

Lets give it 192.168.1.37 with a subnet mask of 255.255.255.0 and we choose it not to act as a router but to be just a server. I recall now that i used this as a router (server/gateway) many years ago when it first came out as it was less trouble than fiddling with red hat all the time. The machine was an old 486 with 2 network cards, one cat 3 for the cable modem and 1 coax for the 10 base T internal network. Since the server supported both samba and appletalk it provide a whopping 2 gig of storage for my coax network of a 586, a 486, a 386 for Doom fragfests and a mac.

Once the configuration questions are finished the settings are written and the machine finishes booting to the login prompt:

We login as root with our admin password. Success. Now from the machine we are writing this one we open a new tab in Firefox and goto http://192.168.1.37 and success - a web page with a message 'This web site under construction' is displayed. Ok we need the admin interface.

Best read the adminstration manual on the wiki. Damn - the wiki is down. I seem to remember that in the old e-smith version you did not log in as root but as admin. Let's reboot the system and see.

Success- logging in at the # prompt as admin with the administrator password brings up a text configuration menu. There is a new option - back up to a USB device. Let's try the server manager option. There is the info - use a web browser and goto /server-manager or use the text mode browser (lynx) from the console. Back to our machine here and firefox.

Succes - except that firefox complains the security certificate from sff is invalid so we have to create an exception. Once that is done we get a login box. We don't have any users so lets try logging in as admin. Success - the admin page is displayed.


Ok - let's play

First we change the windows workgroup name from mitel to workgroup. We set up a user and it will not allow a weak user password but it did allow us to create a weak root password! We will have to look into overidding the security policies tomorrow.

Friday, January 23, 2009

Pics of the new machine

Soul of the New Machine

Fast, fast, fast. Been busing installing lots of goodies, got to fill 1.5 terabytes somehow. Of course there is a 2nd SATA controller and space for another 1.5 t hard drive...

Found a neat application called aptoncd which allows you to copy all the appz you downloaded and installed to a optical disc so they can be installed on another machine without hogging all your bandwidth with downloads.

This pic shows Xara Extreme in one workspace (impressive program) and a movie running in another workspace. On the old 7.10 machine i could not play movies and run the compiz fusion effects at the same time. Looks like that has been fixed.

Only problem i have encountered so far is that when 2-3 cores get near max the variable fan at the front spins like crazy. From post by others it looks like this is a known problem with the Dell Precision 470. I'll have to look at replacing the stock fan.

This pic shows the other 2 workspaces, one is doing some 3D modelling and the other is playing some music. Best get back to work...more fun later.

Monday, January 19, 2009

New Ubuntu Baby

Daddy's got a New Computer

The original machine from last summer's ubuntu project was such a nice success (typing on it now) that we decided to upgrade to a better machine. There is nothing wrong with this computer, it runs 24 hours a day without a crash - in fact has never crashed, or hung or had a virus, or got malware or anything. It does everything from manage my ipod, run the color and bw postscript laser printers, burn movies and cd's etc.

The original pc was a cobbled together Compaq EVO W6000 bought for $64 from vfxweb.com (my favourite store). I upped the ram to 2 gig, added a DVD burner and a Nvidia 7600 GT 512 mb video card and a USB 2.0 card. The whole thing was < 200 bucks. It's now the main machine at chaos basement. The only problem is hard drive space - it has a 73 gig scsi hard drive for the os and the home folder a 18gig scsi scratch disk for temp junk and a USB plug in drive for backup - now 80 gigs and to be replaced tomorrow with a 250gig one.

A good machine but time to move on up. So we went back to vfxweb (my favorite store) and purchased 2 matching 3.20 Ghz hyperthreaded Xeon processors (1 mb L2, 800 mhz bus) and then off to ebay for a bare bones dell machine with 6 USB 2.0 ports, gigabit ethernet, 2 sata controllers (raid), room for 2 SATA hard disks and 2 IDE optical drives. I prefer compaq and HP to dell, they use metal and their machines just say 'quality'' while dell uses cheap plastic. But the price was right.

Added 3 gig of DDR2 ECC ram and a SATA 1.5 terabyte hard drive ($149 at tiger) and an LG DVD burner. Briefly considered putting in 1 gig sticks for a 6 gig machine but that would be excessive. Even my dual G5 mac only has 3 gig.

Next was an Nvidia 8600 GT 512mb pci express video card. Rummaging around the parts bin we added a 2 port firewire pci card and a 64 bit U320 scsi card to fill out the slots.

This project cost > 200 mainly due to the new parts. Probably $400 by the time we were though. Right now it is using a ps/2 kb and mouse and hooked to a 20" sony monitor via 5 coax to vga - later we will replace that with a larger monitor and usb kb/mouse.

Popped in the Ubuntu 8.10 CD and away we go! While we wrote this it has partitioned the hard disk and installed the files. Then it went off to the mirrors. While we let apt do its thing, one nice bit about 8.10 over earlier releases - the liveCD picked up the sony monitor a lot better. Although the monitor is capable of 1600x1200 rez at high refresh the older distros ran at 800x600 until you tweaked the configuration. This time it is running at a much higher screen resolution.

While the last bit is being done i was reading some reviews of windows 7 (really Vista SP2) and was thinking - why would i want this? Yes it has some better security (if stupid nagging is security) and a more modern mac/linux-like interface and.....ummm - can't think of anything it has that i don't have now. But it's user-friendly - or more accutately, user-annoying.

Switching from windows to ubuntu had some pain but now with a smooth running system there is no reason i can think of why i would want to return to windows world. The browser is worse, the system is annoying, it is insecure and it costs money. So far there has been nothing i did in windows that i have not been able to do in Ubuntu.

so why switch?

Monday, December 22, 2008

Joomla on XAMPP

Joomla Installation on a USB stick

These are some quick notes before i forget what i've done.

Goto:http://www.joomla.org/
Download the English 1.5.8 Full Package and save it
Double-click the downloaded Joomla_1.5.8-Stable-Full_Package.zip file
Extract the files to your USB stick in the xampp\htdocs folder into a folder called joomla

If the folder does not exist then create it (about 24mb of space is needed). When finished you should have a file \xampp\htdocs\joomla\index.php on your USB stick

Run the portableapps Xampp control panel and start the mysql and apache servers
Open a web browser and goto http://localhost
Under Tools click on phpMyAdmin
Select Databases
In the Create a database text box type joomla
Select utf8_unicode_ci from the pulldown menu
Click Create

Select the Privileges tab
Click Open new phpMyAdmin window
Click Add a New User
Select Use Text field in the User name: drop down menu
In the User name: text box type in joomla
Select Local in the Host: drop down menu
Select Use text Field in the Password drop down menu
Type joomla in the Password: text box
Type joomla in the Re-type: text box
Scroll down to the Database-specific priviledges
Select joomla From the Add Privileges on the Following database pulldown menu
Add tickmarks to all the boxes in the database specific privileges
Click GO
Close the extra phpmyadmin window
Goto http://localhost/joomla

It takes a minute to load the setup program and then the Joomla Installation page is displayed. The pre-installation check is run. All items should be in GREEN. The default XAMPP install has PHP Display Errors set to ON. This tells PHP to send any errors to the browser so you can see them. For a production site, this option should be off since an error message could give information about your system, a potential security risk. For development purposes, however, this option is useful. You have to edit php.ini and change the line with display_errors to On: (line 292?) to be:

display_errors = Off

Make sure to shutdown and then restart the servers when making this change. It may also be possible to override this on a directory basis with a .htaccess file using the directive:

php_value display_errors on

But i will have to test this sometime later. Anyway, we continue with the install as the error is not fatal.

Click NEXT
Read the license and click Next
The Database Configuration screen is shown
Select mySQL as the database type
hostname: localhost
username: joomla
password: joomla
database name: joomla
click NEXT

The FTP configuration page is shown. Since we will be copying files directly to the USB stick this is not needed.

Click NEXT
Enter your uwo username as the Site Name (ie gnickers)
Add your email address
Enter joomla as the admin password
Enter joomla as the Confirm admin password
Click INSTALL SAMPLE DATA
click NEXT

After setup is complete, you are prompted to delete the installation folder (for security reasons); in fact, Joomla itself won’t run until it detects the installation folder is gone.

Goto your USB stick and delete the xampp\htdocs\joomla\installation folder
Return to the web browser and click on the Site icon
If successful the Joomla home page is displayed
Scroll down to the LOGIN section and login
username admin
password joomla

And the joomla home page is displayed. Now we have to figure out how to create custom sites.

Joomla Administrator

We go to http://localhost/joomla/administrator and the login page appears. We enter admin as the username and joomla as the password and the administration screen appears. There are 3 types of administrative users:

  • super admins - access to everything (the admin user we just logged in as)
  • admins - can access the backend but cannot install extensions or modify super admin accounts
  • managers - can access the backend but are limited to media, content, components and the main menu
Users are created from the control panel using Site, User Manager. Let's create a user with content priviledges as this will allow us to see how a regular user might use the system.

Select Site, User Manager
Click the New icon
Fill in the details for the user
Set the language to english
Set the user editor to TinyMCE
Set the time zone to Eastern Time
Select the Author, Editor or Publisher group - we decide to select Editor
Click the Apply icon

TinyMCE is a platform independent open source web based Javascript HTML WYSIWYG editor that can easily be integrated into content management systems.
See: http://tinymce.moxiecode.com/

The 3 groups of contributors have different priviledges.

  • An author can contribute content to locations defined by the administrator and modify their account information
  • An editor has all the priviledges of an author and is able to edit content written by an author
  • A publisher has editor priviledges and is able to publish content to the site if you have restricted publishing to publishers only
Odd - when we hit apply it kicked up back to the login screen and when we logged back in and looked for the new gnickers user it was not there. Did the session time-out because we took too long to add the user?

We add it again and when we go to save we see the problem. It cannot save the gnickers user because we gave it our email address which is the same as the administrator. We either need to add a different email or set the user not to receive any email - which might be the better option.

I problably should have made the gnicker user a member of the super admin group and created an editor with a different name with no email.

New - solved problem with installing extensions

When i went to install an extension i got the following error message:

* JFolder::create: Infinite loop detected
* Warning! Failed to move file.

The problem is caused not being able to find the tmp and log folders which are hard-coded to a drive letter. The problem is when you move your USB stick from machine to machine the drive letter changes.

  1. Select Site, Global Configurations
  2. Click SERVER
  3. I see the path to temp-folder is hard-coded to J:\xampp\htdocs\joomla\tmp
  4. Click SYSTEM
  5. I see the path to log folder is also hard-coded J:\xampp\htdocs\joomla\logs
I remove the J: from both places and click SAVE. Now when i load an extension the error message is gone. However, their is some debate on the forums as to the desirability of making other changes to configuration files.

The first extension i tried to install timed out when this error:

Fatal error: Maximum execution time of 60 seconds exceeded
in F:\xampp\htdocs\joomla\libraries\joomla\filesystem\folder.php on line 395

We open folder.php and see that the section being referenced in the one that reads the source directory:

$handle = opendir($path);
while (($file = readdir($handle)) !== false)
{
$dir = $path.DS.$file;
$isDir = is_dir($dir);
if (($file != '.') && ($file != '..')
&& (!in_array($file, $exclude))) {



The offending line looks to be the isDir function - if the directory name is not correct then the program is probably spinning it's wheels and then times out. We decide to change the line to be:

$isDir = is_dir($dir.'/' );

and save the file, exit Joomla and restart Joomla. Now we try to load the extension again.

  1. Select Extensions, Install/unistall
  2. Click Browse
  3. Select com_joomlaexploter_1.6.3.zip
  4. Click Upload File & Install
result - no joy so i went back to the file and discovered the same code segment so i changed line 457 and save the file.

Try again - same result - the spinner spins for a while and then the screen goes white. More research is needed.

We check the file structure on the USB stick. First the joomla global configuration settings:

xampp\htdocs\joomla\tmp

Folder exists and has files! In fact the .zip extension we tried to install is in this folder.
There are folders for each install appempt.
Each install attempt folder contains 2 folders, scripts and style
The .zip extenstion archive has 6 folders

xampp\htdocs\joomla\logs

Folder exists but only has a blank index.html file with an old creation date

Next we check the php configuration by going to Help, System Information, Php settings. We find:

upload_tmp_dir \xampp\tmp \xampp\tmp
open_basedir no value no value

Could this be the problem? We check and xampp\tmp - exists but it contains a bunch of files that were just created but with 0 bytes and are empty. Is there a conflict between the joomla global configuration and the php.ini settings?

We search php.ini for open_basedir and find:

; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;open_basedir =

Looks like it is not set which confirms the global settings. Joomla has set this to:

\xampp\htdocs\joomla\tmp

But that path is inthe format of a local path. The php.ini setting would be a relative path for the web server i would think. Maybe this local path should be changed to a relative path?

The path of the web server root is \xampp\htdocs so the tmp folder should be \xampp\htdocs\tmp but there is no such folder. Perhaps \xampp\htdocs\joomla\tmp is correct but that is exactly what we have in the global configuration. I think the php basedir is more likely, can we do something like:
open_basedir = /xampp/htdocs/joomla/tmp

The change is made and we restart. Same result - no joy.
I must say the Joomla wiki entry on this VERY common problem is vague and little help.

Saturday, December 20, 2008

Ghosting Ubuntu to a different Hard Drive

Cloning a Hard Disk

When we originally set up Godzilla, the dual Xeon Evo 6000 it had plenty of disk space, a 73 gig boot drive and an 18 gig drive for storing junk. However, over the year it has had vmware installed to do virtual machine, transmission for getting torrents and a raft of video conversion tools. The plus is the machine is very useful, the downside is that it is filling up. A temporary solution was to plug in an old external USB 80 gig drive. But now that the term is over we need a longer term solution.

The first goal of the project is to get more disk space without re-installing the OS. With a simple machine consisting of a single IDE drive this can be easily accomplished by cloning or 'ghosting' the smaller drive to the larger. We have used Norton Ghost to do this successfully for many years. Put in the new larger drive on the 2nd IDE controller, boot to a ghost floppy and start the clone. Remove the first drive and put the new drive on the primary controller and boot away.

However, the situation gets more complicated if you use multiple drive types such as IDE, SCSI and SATA. Windows has rules about the order in which drive letters are assigned- it is possible to clone a SCSI to an IDE or vice-versa but a system with multiple scsi and ide drives is more difficult. Linux has a similar problem - a simple clone from ide to ide can be done but what if your needs are more complex?

In our case the system has 2 SCSI drives and 1 external IDE mounted in a USB case. We want to clone to scsi boot disk to a old 320 gig IDE disk and maybe later clone that to a 1 terabyte SATA disk.

The first step is to find out exactly what the disk are labelled. We open a terminal window get the following:

gnickers@godzilla:~$ sudo fdisk -l
[sudo] password for gnickers:

Disk /dev/sda: 18.2 GB, 18209792000 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00006694

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2213 17775891 b W95 FAT32

Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00045a17

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 8555 68718006 83 Linux
/dev/sdb2 8556 8924 2963992+ 5 Extended
/dev/sdb5 8556 8924 2963961 82 Linux swap / Solaris

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'!
The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdc1 1 9730 78150743+ ee EFI GPT

We decide to use a couple of other methods to check our results.

gnickers@godzilla:~$ sudo cfdisk -P s /dev/sda
[sudo] password for gnickers:
Partition Table for /dev/sda

First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
1 Primary 0 35551844 63 35551845 W95 FAT32(0B) Boot

and

gnickers@godzilla:~$ sudo tune2fs -l /dev/sda1 | grep UUID
tune2fs: Bad magic number in super-block while trying to open /dev/sda1
Couldn't find valid filesystem superblock.

Which gives an error message. I'm thinking we could simplify matters by disconnecting the external USB disk and the 18 gig internal scsi drive. We probably should reboot the system anyway as it has been up all term and probably needs to fsck the filesystem anyway.

Reboot - nothing. It does not come up to sdb1. Check connections and ensure adaptec scsi controller is set to boot the hd with id = 1. Reboot. no joy. So let's put the 18gig scsi back in and reboot again. The GRUB boot loader appears but lists Error 21 which means it cannot find the disk. We go into the scsi bios and see the 18gig is ID = 0 but the 73 gig has disappeared. A loose power connector. Fix and restart. no boot. So i undo the only other changes and set the scsi bios to boot to id0 which is the 18 gig and it works.

We need to take a closer look at this.

Sunday, November 16, 2008

Portable Xampp

Running LAMP on a USB stick

Last year we decided to stop using IT services and teach programming by having students run LAMP from a usb stick using server2go. It was successful enough (despite some new technology problems) that we want use the same approach again. With larger and faster usb drives like the excellent Corsair Flash Voyager GT series this is now a useful option.

We had downloaded and installed the XAMPP stack on our linux laptop and were quite impressed by the excellent job done by the project team. The next step was to try running it on a usb stick using the portable apps project.

The portable apps web page has an installable XAMPP control panel which we added to our stick and then:

  1. Double click StartPortableApps.exe
  2. Click the portable apps icon on the taskbar
  3. Scroll down and click on Xampp control panel
  4. Place tickmarks in the Apache and mySQL services
  5. Click the start button for each service to start them
  6. Goto http://127.0.0.1/ Which laods the xampp/index.php (be sure to allow 127.0.0.1)
  7. The status menu item will let you know what is running.
On my first attempt mysql was not running so none of the demos worked.

The problem was that i had been running wampserver off the desktop the usb was plugged into. Although i had shutdown wampserver the apache webserver was still running which prevented xampp from operating correctly.

The solution was to go to control panel, administration, services and to change the wampapache service properties to manual and to shut down the service.

I then re-ran the xampp control panel from the portable apps menu and when we clicked on the status menu item we see mysql is running correctly on port 3306 and apache is running on port 80.

We try out the demo apps and they all work. The next task is to port some of my examples from the server to the usb stick. This involves:

- exporting the mysql database into a backup .sql file
- creating the users on the mysql usb database
- restoring the database from the backup.sql file
- copying the .php .css .htm and .jpg files from the application's folder to the usb stick

Sunday, November 9, 2008

Virtualbox Win95

Windows 95 on VirtualBox

I wanted to play an old game - Axis and Allies but it does not run on XP and the company has never released an updated version or even fixed the bugs. Hasbro has a habit of buying up the IP rights to classic board games and then releasing terrible computer games based on them (while preventing anyone else from releasing a good game!)

Anyway i decided as a test to install win95 on vb to see how it goes. The vb version is the closed one version 2.0.4

  1. Click New
  2. Give it a Name of Win95
  3. Select Windows 95 from the OS Type pulldown menu
  4. Allocate 128 mb of ram memory
  5. Click New in the Boot Hard Disk dialog box
  6. Choose Fixed Sized Image
  7. Make it 1 gig in size
  8. Click Finish

Note to self: The removal of the previous virtual box left the xp virtual machine as xp.vi in /home/gnickers/.VirtualBox/VDI - test and see if we can use this later!)

Click Start
Delect CD/DVD-ROM device abd Host Drive
Click Finish
We get 'no bootable medium found . System halted'
Insert the win95 install cd
We select Reset and press F12 and select CD-ROM

The error: 'Fatal: could not read from boot medium. System halted'
We shutdown the vm and restart with no change.

We try clicking on setup.exe from the cdrom0 window which runs the install program, but it says you cannot 'run setup from within windows NT'. This looks like it is running the install program - perhaps using Wine!

I seem to recall having the same problems last time i tried virtualbox - while setting up and installing vmware was more difficult, creating virtual machines seemed easier and more obvious using vmware than virtualbox.

Let's try to recover the old xp vm

  1. Select New
  2. Select Windows xp as the os type and call it xp
  3. Assign 512mb of ram
  4. Select the old xp.vdi as the boot hard disk
  5. Click Finish
  6. Click Start

Turns out the image does not work - xp starts to run but generates a bunch of errors. Expected really so we deleted the xp vm. Best check the xp.vdi to make sure the 10gig file gets deleted too!

Ok - now i remember the problem - the boot order is set to floppy drive (remember those?) and then to cd/dvd and the last time we did this we had the same problem.

  1. Click Settings, General
  2. Select the Advanced tab
  3. Untick the Floppy box (since we have no floppy drive...)
  4. We also do cd/dvd-rom and place a tick in Mount CD-DVD drive and also Audio, enable audio and set the audio to use the ALSA audio driver.

One annoyance is that an error message about 'usb services' comes up. We had the same problem with virtualbox 1.5.0 ose and the fix rather technical.

BTW - we notice that snapshots are stored in /home/gnickers.VirtualBox/Machines/Win95/snapshots for this vm.

Ok we put in the win95 cd and start up the vm. No joy. A complete waste of time so far. Probably because i forgot that windows 95 is so ancient it requires booting from a floppy before you can run the install. I wonder if i can install it by booting up a freedos vm and then running setup.exe. Maybe later.

Let's see if the XP install that worked before will still work again.

Installing XP on VirtualBox

First - Follow the instructions on enabling USB support BEFORE starting virtualbox

  1. Click New
  2. Set the memory (we have 4 gig so we gave xp 512k)
  3. Click New to create a virtual hard disk (10 gig is fine for a test install)
  4. Click Settings (If you get an error message about USB see below)
  5. Adjust the video memory size (16 or 32mb)
  6. Click the Advanced Tab and untick the floppy in Boot Order
  7. Click CD/DVD-Rom and select the mount cd/dvd radio button
  8. Select Audio and tick Enable Audio and select the ALSA Audio Driver
  9. Click USB and place a tick in the enable USB controller
Ok now we are ready to run the XP vm and install xp from the cd.

  1. Start the xp vm
  2. Put in the xp cd
  3. We see the message - press a key to boot from the CD
  4. We press a key and the xp installer runs
The rest is the boring xp install. However once the installer has run there are some housekeeping chores to do such as turning off the automatic updates, and security center, the remote access and all that other junk.


Virtualbox USB Fix

Select Applications, Accessories, terminal and enter:

sudo gedit /etc/init.d/mountdevsubfs.sh

Go to the lines as shown below:

#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs «» /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb

Uncomment the last 4 lines by deleting the # marks to make it look like below:

#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs «» /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

Click SAVE
Select File, Quit

Now type this in terminal:

gksudo gedit /etc/udev/rules.d/40-permissions.rules

We then commented out the following system line by placing a # mark before it and added a # comment line saying when and why we made the change. We then copied the following line and edited out the # mark and did the following. Change:

SUBSYSTEM==»usb_device», MODE=»0664»

to

SUBSYSTEM==»usb_device», MODE=»0666»

We then did File, Save and exited the text editor.
And then rebooted the system

Now we Rerun virtualbox and when we click on SETTINGS there is no error message about USB.

Running VirtualBox

We were running virtualbox from the command line after the install by type VirtualBox which was a real annoyance. We wondered why the install did not add an entry to the system tools menu. As it turns out we were wrong - it DOES add a Sun xVM VirtualBox entry but NOT until you reboot!