Perryg wrote:As su or sudo
So if you share name = share and you mount point = /mnt/share
Booboo #1: I thought the "share" name was something you just made up. It is the share name from the VB Console shared folders dialog. Got that fixed.
Code: Select all
mount -t vboxsf -o rw,uid=1000,gid=1000 share /mnt/share
Is there a way to set the gid and uid so everyone can read it? (My gid is 100 (users) and my uid is 500)
Also remember that the share name can not contain spaces or characters.
I will change the name to /mnt/VBoxTemp
Question, why the sbin?
"mount" passes the information on to /sbin/mount.vboxsf. I was looking for extra info.
Also guest additions must be installed for shared folders to work.
they are
Next thing to look at is all the garbage in the rc.local file. Is it really needed? If so can you tell my why?
My new rc.local portion dealing with this:
Code: Select all
# Note: the "Usage: /sbin/mount.vboxsf [OPTIONS] NAME MOUNTPOINT"
# "NAME" is the name given to it in the Virtual Box Console's
# Shared Folders dialog
Explains what is going on
Code: Select all
HostShareName="Temp"
GuestMountPoint="/mnt/VBoxTemp"
I am in full programing mode. I always put names that are repeated in variables, they way I only have to change the name in one spot. It saves you a ton of headaches
Code: Select all
if [ ! -d "$GuestMountPoint" ]; then mkdir "$GuestMountPoint"; fi
If the mount point does not exist, then create it. This is a butt saver.
sets the sticky bit so whoever is trying to use it can take ownership of it. Also lets me know what the ownership needs to be after whoever has taken ownership. It is also a butt saver
Code: Select all
echo "mount -t vboxsf "$HostShareName" "$GuestMountPoint" -o rw,suid,umask=0"
helps with hand troubleshooting
Code: Select all
mount -t vboxsf "$HostShareName" "$GuestMountPoint" -o rw,suid,umask=0
the actual mount call.
Code is cheap.
And, it still does not work! Rats!
<SharedFolders>
<SharedFolder name="Temp" hostPath="/home/OurStuff/Temp" writable="true"/>
</SharedFolders>
# ls -al /mnt
drwxrwsrwx. 2 root root 4096 Dec 6 15:51 VBoxTemp
# mount -t vboxsf Temp /mnt/VBoxTemp
/sbin/mount.vboxsf: mounting failed with the error: No such file or directory
What no directory?!?!?! :'( What crappy error messages!
Poop!
-T