Page 1 of 1

no permission to execute a file in shared folder

Posted: 11. Oct 2008, 04:38
by simonwolf
Hi, all.

I encounter a problem of no permission to execute a file in shared folder.

Host: windows xp
Guest: ubuntu8,04
VirtualBox version: 2.02

I created a shared folder named G_LINUX_PROG for a G partition in windows xp.
And I mount the shared folder with the following command&option:

#sudo mount -o exec,rw,uid=1000,gid=1000 -t vboxsf G_LINUX_PROG /mnt/shared/linux_program

Then i change directory to /mnt/shared/linux_program//gcc/conceptgcc-4.3.0-alpha-7
And using the "ls -l" command, which show the following infomation:
-rw-rw-rw- 1 simon simon 32639 2007-04-05 23:25 config.sub
-rw-rw-rw- 1 simon simon 384631 2007-04-05 23:25 configure
-rw-rw-rw- 1 simon simon 87629 2007-04-05 23:25 configure.ac

then I use "chmod 777 configure"
After this, the "ls -l" command, which show the following infomation:
-rw-rw-rw- 1 simon simon 32639 2007-04-05 23:25 config.sub
-rw-rw-rw- 1 simon simon 384631 2007-04-05 23:25 configure
-rw-rw-rw- 1 simon simon 87629 2007-04-05 23:25 configure.ac

>>>>>>the mode of the configure file did not changed!!!

So, my question is that how to solve this problem??

Is there anyone encouter this?

Thank you..

Posted: 11. Oct 2008, 13:09
by Sasquatch
Chmod only works on Linux file systems, like ext2/3. You set the file mode with the mount options, and that was already correct.

It's still best to compile on a Linux native FS, so copy it to your home folder. I tried it myself a few days ago to compile a program and make a package from it, but that ended up with some error. Copying the files to my home folder solved that.

The way I have my fstab entry is with the options defaults,auto,rw,gid=1000,uid=1000. Defaults adds both rw and exec, so my rw addition is obsolete :P.

Posted: 11. Oct 2008, 16:55
by simonwolf
Thank you, Sasquatch.

Since i have not enough disk space for ubuntu to compile the software, I expect to compile it in xp and install to ubuntu ...

Posted: 11. Oct 2008, 17:34
by Sasquatch
You can always add an additional VDI file to the VM. Be sure to partition and format it before you can actually use it. And mount it of course ;).