Hi,
I succesfully mounted my shared folder
mount -t vboxfs -o defaults,uid=diddek,gid=diddek Public /home/dude/diddek
This gives me r/w - but no exec!!
chmod +x changes nothing
I badly need this (compiling/running tests), could anyone please help?
D
Shared folder no execute rights (chmod +x does not work)
Execute permission on a file in a shared folder
I've installed virtualbox 1.6.2 on MacOSX.
The guest is Linux (Ubuntu, hardy heron).
In a shared folder, I created hello.c.
On the guest, I compiled it, but the execute permission is missing:
vbox:/mac$ gcc hello.c
vbox:/mac$ ls -l
-rw------- 1 paul dialout 6362 2008-06-18 10:26 a.out
-rw------- 1 paul dialout 79 2008-06-18 10:13 hello.c
Manually setting the x bit does not work:
vbox:/mac$ chmod +x a.out
vbox:/mac$ ls -l
-rw------- 1 paul dialout 6362 2008-06-18 10:26 a.out
-rw------- 1 paul dialout 79 2008-06-18 10:13 hello.c
However, running the "chmod +x a.out" on the mac does properly
change the mode and allows the guest to run the binary:
vbox:/mac$ ls -l
-rwx--x--x 1 paul dialout 6362 2008-06-18 10:26 a.out
-rw------- 1 paul dialout 79 2008-06-18 10:13 hello.c
vbox:/mac$ ./a.out
Hello from C
Is this a know issue (has a bug been filed?)
thanks,
Paul
The guest is Linux (Ubuntu, hardy heron).
In a shared folder, I created hello.c.
On the guest, I compiled it, but the execute permission is missing:
vbox:/mac$ gcc hello.c
vbox:/mac$ ls -l
-rw------- 1 paul dialout 6362 2008-06-18 10:26 a.out
-rw------- 1 paul dialout 79 2008-06-18 10:13 hello.c
Manually setting the x bit does not work:
vbox:/mac$ chmod +x a.out
vbox:/mac$ ls -l
-rw------- 1 paul dialout 6362 2008-06-18 10:26 a.out
-rw------- 1 paul dialout 79 2008-06-18 10:13 hello.c
However, running the "chmod +x a.out" on the mac does properly
change the mode and allows the guest to run the binary:
vbox:/mac$ ls -l
-rwx--x--x 1 paul dialout 6362 2008-06-18 10:26 a.out
-rw------- 1 paul dialout 79 2008-06-18 10:13 hello.c
vbox:/mac$ ./a.out
Hello from C
Is this a know issue (has a bug been filed?)
thanks,
Paul
bug report
Not by me - I have exactly the same setup; osx host + heron guest (linux)
The following:
#include <iostream>
in main() {
std::cout << "Hello from C++" << std::endl;
return 0;
}
g++ -o test test.cpp
does not give an executable 'test' .
cmod +x in heron does not work, in osx (the host) it *does* work; after which 'test' is executable in heron too...
I think we should file a bug.
Best, Dirk
The following:
#include <iostream>
in main() {
std::cout << "Hello from C++" << std::endl;
return 0;
}
g++ -o test test.cpp
does not give an executable 'test' .
cmod +x in heron does not work, in osx (the host) it *does* work; after which 'test' is executable in heron too...
I think we should file a bug.
Best, Dirk
workaround
I posted this in the ticket, but cross posted here for search engines to pick up... I have edited the vboxvfs kernel module with an ugly workaround for doing compilation/development in a shared folder (the joys of open source! Otherwise I'd be screwed on monday! )
How to:
But at least this lets me do development within a shared directory...[/code]
How to:
- 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
- to clean up: cd .. && rm -rf vbox
But at least this lets me do development within a shared directory...[/code]