Share folders cannot execute files

Discussions about using Linux guests in VirtualBox.
Post Reply
strategist333
Posts: 2
Joined: 18. Aug 2008, 06:24

Share folders cannot execute files

Post by strategist333 »

On Ubuntu 8.04, I'm having a bit of trouble allowing g++ compilation in my shared folder to execute. I currently have my mount call as

sudo mount -t vboxsf -o rw,exec,uid=1000,gid=1000 share /mnt/share

When I go in Nautilus to view the properties of the executable, I can't check the 'Allow executing file as program' option under Permissions. I also can't do this for the cpp file that I'm trying to compile. Copying the executable onto my desktop allows me to check the option, after which I can then run the program.

Is there some option I'm missing in the mount call that is preventing all files from being able to execute? I'm using VirtualBox 1.6.4 on Vista Premium 32 as host.
h1d
Volunteer
Posts: 170
Joined: 3. Jul 2008, 02:10

Post by h1d »

I thought it was copying the permission off the host's file system and is not changeable on the guest. (Ends up as 777 if host is on FAT) Shared folder feature is rather limited imo.

You can probably have better luck mounting host with cifs, then you can change permissions (although, if you remount, all of the specified permissions will be reverted)
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Did you check the permissions from within a Terminal? If you do an ls -l you will see the mask of the files. It should note -rwx-rwx-rwx for the file. Shared Folders are like network shares, you can't change the mask on the files.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
h1d
Volunteer
Posts: 170
Joined: 3. Jul 2008, 02:10

Post by h1d »

Except, nfs or cifs can but not vboxsf.
Btw it should look '-rwxrwxrwx' if it is 777.

What file system on the host are you mounting?
strategist333
Posts: 2
Joined: 18. Aug 2008, 06:24

Post by strategist333 »

Using ls -l, I get -rw-rw-rw for all files in /mnt/share (my mountpoint).

EDIT: Interestingly, with ls -all, I see that the folder . has permissions drwxrwxrwx

My host is using NTFS. Is there some option I need to set in Windows to get the x to show up?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

I just checked with my Ubuntu Server VM to see what my mount options are, and they are as following:

Code: Select all

Entry in /etc/fstab
data  /data  vboxsf  defaults,gid=1000,uid=10000,auto,rw
My data partition on my Host is NTFS (Host is Ubuntu 8.04, Guest is 8.04 server). Now when I do an ls -l /data I get the following:

Code: Select all

-rwxrwxrwx 1 sasquatch sasquatch  452  2008-06-28 12:06 New Text Document.txt
This entry is for all files I have on the mount point.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
h1d
Volunteer
Posts: 170
Joined: 3. Jul 2008, 02:10

Post by h1d »

Pretty crazy if you ask me...

If the guest has ssh access to someone else, then all your files are owned...
Btw it's 'ls -al' you don't need 'l' twice. But my recommendation for 'ls' is '-aCFhl'
Post Reply