Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Windows7 PC with a hosted VirtualBox (Ubuntu). On the VirtualBox is an Apache2. The is shared to the Windows7 host. So if I use ls -l I see that the contents are owned by root:vboxsf.

If I switch on the VirtualBox to the Apache user "www-data" (sudo su www-data) I am not able to use mkdir -p /newfolder/newsubfolder

The following would work mkdir /newfolder mkdir /newfolder/newsubfolder

If I run a PHP-Script I have also trouble with mkdir() if the third parameter is true mkdir("/newfolder/newsubfolder", 0774, true);

I have also a problem if I use a PHP-Script with file_exists(). The result is always true.

How do I have to configure the shared folder?

share|improve this question
up vote 0 down vote accepted

It works if I add sth. like mount -t vboxfs htdocs /var/www -o uid=www-data,gid=www-data to /etc/rc.local

htdocs is the name of the share in VirtualBox.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.