Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 0 down vote accepted

Solution:

  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)

At least this lets me do development within a shared directory.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .