How automount shared folder in fstab as read-write? My code isn't working...

In fstab, I have the following:

mysharedfolder    /var/www/myfolder    vboxsf    rw,uid=33,gid=33    0    0

If I instead run it via the terminal like below, it works. This mounts the folder:

sudo mount -t vboxsf -o rw,uid=33,gid=33 mysharedfolder /var/www/myfolder/

How do I get fstab to mount it on boot?

On 2013-07-31 02:46, 6tr6tr wrote:

> How do I get fstab to mount it on boot?

Is “mysharedfolder” a device?

Where is the path?


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

“mysharedfolder” is the name I gave it in VirtualBox under “shared folders”. I’m not certain where the folder’s path is, but there is a folder in “/media/sf_mysharedfolder”. Not sure if that’s where VirtualBox puts the actual mounted path, but likely. If that’s true, then why does the command I ran in the Terminal work?

I just found this info: HOWTO: Use Shared Folders - virtualbox.org which says that fstab is loaded before shared folders are set up. So I need to put the mounting in something that is called at the end of boot. They suggest /etc/rc.local. Will that work? What syntax would I use?

EDIT: This syntax did NOT work:


mount -t vboxsf -o rw,uid=33,gid=33 mysharedfolder /var/www/mysharedfolder

Sorry, it did work! I just had a misspelling, using a zero instead of an “o”. :open_mouth: