Page 1 of 1

Apache in guest cannot access files though shared folder

Posted: 23. Nov 2011, 02:09
by jefft
Symptom is that Apache running in the guest (Ubuntu LTS server) is unable to serve files stored in the host in a shared folder. Strange thing is that the files on the guest are accessible though the shared folder using a shell (user can copy or view files) and also Apache is able to display a directly listing of the files, but when a user clicks on a file in the listing, then the file appears to be served (downloaded to the user), but there is no content (zero bytes). Also, when this happens errors like the following appear in /var/log/messages

Code: Select all

Nov 22 23:08:25 crcns kernel: [ 8082.266785] VbglR0HGCMInternalCall: vbglR0HGCMInternalPreprocessCall failed. rc=-2
Nov 22 23:08:25 crcns kernel: [ 8082.266902] VBoxGuestCommonIOCtl: HGCM_CALL: 64 Failed. rc=-2.
(crcns is the name of the server).
This problem came up after I upgraded to VirtualBox 4.1.6 (and the guest additions in the guest OS) and also upgraded my host OS (Snow Leopard Server) to 10.6.8. Guest is running Linux kernel 2.6.24-29-virtual, same problem with 2.6.24-30-virtual kernel. I tried mounting the shared folder using user that Apache runs under, via:

Code: Select all

mount -t vboxsf  -o uid=33,gid=33,rw site-files /mnt/site-files
(33 is the user that Apache runs under). but that did not help. I think the error messages in the messages file are probably a big clue, but I don't know what they mean.

Any suggestions?

Re: Apache in guest cannot access files though shared folder

Posted: 23. Nov 2011, 12:34
by vbox4me2
Use a real(samba) share, vbox shares are a poor mans solution.

Re: Apache in guest cannot access files though shared folder

Posted: 23. Nov 2011, 21:35
by jefft
Wouldn't a samba share be slower since samba has to go through network protocol stacks, while the VirtualBox shared folders can be optimized for the guest and host OS direct file access? In this application, there may be many simultaneous file accesses, so speed could be important.

Re: Apache in guest cannot access files though shared folder

Posted: 23. Nov 2011, 23:40
by vbox4me2
Not in my experience, a local share here is alot faster then a VBox share (on the same machine).