Home » Questions » Computers [ Ask a new question ]

Setting execute permission on a Fedora 11 (host and guest) shared folder file is not working for me. Is anyone doing this successfully?

Setting execute permission on a Fedora 11 (host and guest) shared folder file is not working for me. Is anyone doing this successfully?

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.

Asked by: Guest | Views: 60
Total answers/comments: 1
Guest [Entry]

"Solution:

Mount the VBoxGuestAdditions.iso (e.g. /media/cdrom0)
mkdir vbox && cd vbox && /media/cdrom0/VBoxLinuxAdditions.run --tar -xf
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)
sudo ./install.sh vfs-module
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."