compiling in shared mount, can't execute file (mac/ubuntu)

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
wfpunch
Posts: 3
Joined: 14. Jan 2009, 20:39

compiling in shared mount, can't execute file (mac/ubuntu)

Post by wfpunch »

I am running Leopard 10.5.6, VB 2.1.0 and Ubuntu 8.10. The Mac is the host, Ubuntu the guest.

I have created a shared folder under vbox for my home mac directory. I have modified my /etc/fstab in Ubuntu to have the following line

billMac /mnt/billMac vboxsf defaults,rw,exec,uid=1000,gid=1000 0 0

On boot, I get the mount. I can read and write. Problem is compiling in the share folder. If I change to /mnt/billMac and compile a file (gcc), it compiles, I get an "executable" but it lacks execute privileges. Furthermore, I am not permitted to modify the execute bit of the file.

Clearly I asked for execute privileges in fstab, but didn't get them. Anyone know why?

>>>bill<<<
wfpunch
Posts: 3
Joined: 14. Jan 2009, 20:39

Post by wfpunch »

Bump
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Bill, sorry for missing this one first time around. I've just answered this same Q on another topic. The answers are usually out there if you look for them. The problem is that the fstab is processed early in the boot sequence before the vboxsf device driver is loaded. On Linux you stick the mount in your rc.local. I don't know if this is exactly the same file on MacOS, but since MacOS in now a *nix derivative there will be a similar hook file to put system-local startup commands into the boot sequence.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

And also have a look the Forum Posting Guide for help in framing Qs. Please don't cross post. I've deleted the second copy of your post.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
wfpunch
Posts: 3
Joined: 14. Jan 2009, 20:39

Post by wfpunch »

Thanks for the reply. Shouldn't of cross-posted but I wasn't getting any feedback.

Anyway, I but the following in rc.local on the ubuntu guest

mount -t vboxsf -o defaults,uid=1000,gid=1000,rw,exec billMac /mnt/billMac

Does do the mount, but still no exec privs inside. I'll keep looking but if it is something obvious (I did look around a bit) I'd appreciate knowing. Thanks again.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Do a mount.vboxsf --help to see the syntax. You may need to set dmode and fmode.

The reason for deprecating cross posting is that to answer Qs here (i) you need to understand VBox in depth, (ii) you need to understand the various OSs: Windows, Linux, Solaris and Mac, (iii) Development and Sysadmin skills help. (iv) You need to be willing to put in the hours pro bono. In practice less than 6 of us provide over two-thirds of all answers, and another 50 or so reasonably active posters the other one third. All that cross posting does is to piss off the 6 :-)
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
Post Reply