0

I have an Ubuntu 12.04 guest running on an Ubuntu 13.10 host. I created a shared folder in the host following the documentation. When I try to mount the folder in the guest the result is:

$ sudo mount -t vboxsf -o uid=$UID,gid=$GID shared ~/host
gid= requires an argument (i.e. gid==<arg>)

I found no results when searching online for this error.

Zanna
  • 70,465
Luís de Sousa
  • 13,227
  • 26
  • 81
  • 128
  • see http://askubuntu.com/questions/30396/error-mounting-virtualbox-shared-folders-in-an-ubuntu-guest – Takkat Apr 10 '14 at 20:01

1 Answers1

2

I think the problem is that unlike $UID, $GID is not a bash built-in variable. Instead, you may be able to use $(id -g) i.e.

sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) shared ~/host

or (for consistency)

sudo mount -t vboxsf -o uid=$(id -u),gid=$(id -g) shared ~/host
steeldriver
  • 136,215
  • 21
  • 243
  • 336