I have set up a VirtualBox Fedora 11 (i386) guest on my Fedora 11 (x86_64) host system with shared folders enabled. I mount the shared folder successfully with the recommended "mount -t vboxsf share /shareddir -o rw,exec,uid=500,gid=100" command. I can successfully read and write files in the share from the guest but I cannot set the execute bit on any file in the share from the guest system. Nothing in GoogleSpace seems to address my issue let alone provide a solution. fwiw, selinux is disabled on both the guest and host and the shared folder is an ext4 file system.

link|improve this question

feedback

1 Answer

up vote 0 down vote accepted

Solution:

How to: 1. mount the VBoxGuestAdditions.iso (e.g. /media/cdrom0) 2. mkdir vbox && cd vbox && /media/cdrom0/VBoxLinuxAdditions.run --tar -xf 3. edit module/vboxvfs/utils.c, change line 96 "mode |= mode_set (IXUSR);" to "mode |= S_IXUSR;" (note addition of "S_" prefix... basically, always set executable flag) 4. sudo ./install.sh vfs-module 5. cd .. && rm -rf vbox

This sets the executable flag in the guest only (mode 700) for all shared files — the host still always gets mode 500 for newly created files. Hopefully a dev can make a proper fix. (slight improvement: set executable on new file creation, and keep file permissions in sync otherwise so non-executables in the host don't show up as executable in the guest)

But at least this lets me do development within a shared directory...

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.