Virtualbox does not start on Mac OSX

If you’ve recently upgraded your Mac to OSX El Capitan and you have an issue where Virtualbox has decided to no longer work, try this:

for bin in VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT VBoxHeadless; do
    sudo chmod u+s "/Applications/${bin}"

Found via this link on StackOverflow.