You are here
Hello, Turnkey Community!
Background
With the intent to create a development-testing server for website development, I imported the Turnkey LAMP virtual appliance into Virtualbox. My workflow is such that all of my working files are stored on my host machine (Windows 8) in a directory, say M:\Websites.
My desire being to access the sites contained in this directory by simply visiting the URL "http://{LAMP Appliance IP}/{Site subdirectory}," I followed the directions specified in this Turnkey Documentation Tutorial on mounting shared files with Turnkey Linux and Virtualbox in order to create an entry in /etc/fstab that automatically mounts my M:\Websites directory to /var/www/sites via filesystem loopback. The contents of my new entry are as follows:
/media/sf_Websites /var/www/sites bind defaults 0 0
To complete the process I proceeded to set the document root for my *:80 virtual server to /var/www/sites as opposed to the standard /var/www.
Problem
While my fstab entry is succesful (verified by my ability to browse the contents of M:\Websites by transversing /var/www/sites from the LAMP appliance command-line, SSH, and Web-shell), I am given only 403: Forbidden errors when I attempt to visit the URL "http://{LAMP Appliance IP}" or any sub-directory.
Executing "ls -l" within the /var/www directory displays the following permissions for my "sites" mount:
drwxrwx--- 1 root vboxsf 16384 May 1 21:37 sites
What am I missing here??
Worked it out. I was using
Worked it out. I was using Virtualbox's "Automount Share" feature which did not allow me to specify the options that I wished the share to mounted with. I removed the automount feature and the filesystem loopback fstab entry that the aforementioned tutorial recommended, and proceeded to create an fstab entry to mount the share with the options I desired:
Sorry I haven't responded sooner....
I have been really busy so haven't been as vigilant on the forums as I might like.
But excuses aside - I wrote that tutorial. It was a while ago and IIRC I wrote it as I set it up and was busy doing something at the time (I needed to sort this out...) and I vaguely recall that issue. I think I resolved it by just adding www-data to the vboxsf user group... But obviously forgot to go back and add that final note... Sorry about that. Glad you found a solution.
Hey Jeremy! Absolutely no
Hey Jeremy!
Absolutely no worries, mate! As a whole the tutorial was great, and even having to dig around on-line I can't complain about learning more Linux tricks ;) . Rock on friend.
I know this is old, but can you help?
I'm running into the same problem expressed here, but I can't seem to get anything to work now. I initially had a folder auto mounted and have since removed that and then just added it in without the option.
I then placed the entry in my fstab which should be mounting the thing, but it isn't mounting at all now. This is what I have:
Sites is the name of the folder that is being shared in Virtualbox and /var/ww/sites has been created.
I've rebooted the machine several times and even tried manually mounting the folder, but that just throws an error: "mount: special device Sites does not exist".
I've tried looking in the logs for errors, but don't see any at all so I have no idea how to get past this. Can someone assist? My linux skills are pretty minimal so I don't know where to go from here.
Do you have VBox Guest addons installed?
I'm assuming that you do (because the error message that you get suggests that to me). And also make sure that you have the folder shared within VBox UI still too.
The errors you are reporting suggest that your VM just can't see the folder... It sounds like VBox isn't making the share available to the VM. You'll need to work out why that is before you can proceed. My guess it either Vbox isn't passing it through (which you'll need to troubleshoot within VBox settings) or for some reason VBox tools isn't seeing the share...
I wonder if this has something to do with an updated Vbox install or something? You mention that it was working but not now... That suggests that something has changed...
They are installed but...
Thanks for getting back with me Jeremy. The addons are installed, but I initially had issues with that - before I saw the writeup here about how to do it properly. Once I got them installed and I shared the folder automatically, I was able to see it just fine in the VM. However that's when I ran into all the permissions issues and went to set it up manually.
So I removed the share, rebooted the VM and made sure it wasn't still getting mounted (which it wasn't), added the share in VBox again, but didn't set it up as automatic. I beleive it is marked as "permanent" though, but that happened automatically.
After several reboots and doublechecking the settings and mount in fstab, still can't see the thing. Maybe I'll try adding the share again in VBox and see what happens.
I am having the same problem with VMware shared folder!
I solved and created a guide here...
http://unrevealingbox.blogspot.com.es/2015/09/how-to-mount-vmware-shares...
Add new comment