Standard VirtualBox installations are configured to run the binaries 'setuid root'. A requirement to be able to start the VirtualBox applications, is that the user starting them is in the 'vboxusers' group. Most webservers run as the 'www-data' user.
You have a few options: - Run the webserver as root (bad for security!) - Use sudo to run the VirtualBox commands as root (also not very good for security) - Use a daemon running as root (or another user in the vboxusers group, could be a php script as well), which accepts and executes commands from the non-root webserver user (could provide the best security, if done properly) - Add the www-data account to the vboxusers group (using the command: adduser www-data vboxusers) Also note that a php frontend to virtualbox already exists: http://code.google.com/p/phpvirtualbox/ Best regards, Ivo Op 12-5-2011 2:00, James Frost schreef: > Hello all, > > I'm working at a school as an intern and I have been given > the assignment of creating a PHP-frontend for VirtualBox. > > I managed to get pretty far with is on Windows (filter VMs based on > username, let each user control his vms) > but when trying to port the commands to Linux I came to a deadstop. > I've been using shell_exec in windows and while it works in linux aswell > but not for the vbox commando's > > The problem is that the 'www-data' user can't execute the vboxmanage > command. > > does anyone happen to know how to get started with php and vboxmange in > linux? > > Regards, > > Bostoen Jimmy > > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ VBox-users-community mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/vbox-users-community
