Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.