Page 1 of 1

Odd shared folder / file permission issue

Posted: 11. Nov 2011, 05:16
by insano5000
I am running an Ubuntu 11.10 guest on a Mac 10.7.2 host.

I am able to create the following via an ls command on my Ubuntu guest, which lists the contents of a shared folder directory (which was auto-mounted).
Screen Shot 2011-11-10 at 10.10.58 PM.png
Screen Shot 2011-11-10 at 10.10.58 PM.png (17.8 KiB) Viewed 10065 times
Notice the permissions and ownership of the test4.php file. This file is unable to be read/written by the guest.

I am able to create this scenario by doing the following two steps:

1) Attempt to access the test4.php file via Apache running on the guest BEFORE the file actually exists.
2) Create the test4.php file on the HOST. (Creating the file on the guest works fine)
3) Run the ls command on the guest.

I've seen a thread or two with others who have had this problem but no helpful responses were given. Has anyone else seen this issue?

Re: Odd shared folder / file permission issue

Posted: 11. Nov 2011, 17:18
by Perryg
My suggestion is to *not* use the auto-mount feature. Use the manual mount with the options switch and if it works you add the mount statement to the /etc/rc.local file.

Example: sudo mount -t vboxsf -o rw,uid=1000,gid=1000 <share name> <mount point>
replacing your uid, gid and <sharename> <mount point> with your information.

Makes sure that the <share name> is simple with no spaces or special characters.

Note: to eliminate the auto-mount you need to remove it from the guest, shut down the guest (not saved state) remove it from the guest settings and start the guest. Then go through the selection of the shared folder from the guest and selecting permanent.

Re: Odd shared folder / file permission issue

Posted: 11. Nov 2011, 17:23
by insano5000
Thanks Perryg. Unfortunately I have already tried that, and noticed the same behavior. I re-enabled auto-mount because I wanted to use the native setup that Virtualbox provides. My hope is that this is a known bug which can be easily identified and fixed by the Virtualbox team.

Re: Odd shared folder / file permission issue

Posted: 11. Nov 2011, 19:51
by Perryg
It very well may be a bug in the MAC side of the code. I know it works in Windows and Linux.

However if you want the DEVs to take a look, this should be reported to bugtracker. You will need to setup an account there as it is on a different system.
It would also help if you can post the ticket number here so other can see the progress, add information, or see the final results.

Be sure to provide the guests log file (as an attachment) and any other information that might help them to sort this out.

Re: Odd shared folder / file permission issue

Posted: 12. Nov 2011, 00:05
by insano5000
As suggested above, here is the ticket url for anyone else following this issue.

https://www.virtualbox.org/ticket/9887

Re: Odd shared folder / file permission issue

Posted: 23. Nov 2011, 10:49
by mtsmit2
I am running into the same issue. It doesn't seem to matter if the file is created on the guest or host as long as it is in a shared folder.

Has anyone found any sort of solution other than rebooting the VM?

Re: Odd shared folder / file permission issue

Posted: 23. May 2012, 23:01
by Andrew Vit
I'm having the same problem here. I would appreciate if anyone has a fix or a workaround for this bug... I added my details to the bug report linked above.

Re: Odd shared folder / file permission issue

Posted: 30. May 2012, 12:39
by Andrew Vit
Looks like the bug ticket was updated and a fix is available in SVN source... Hoping for a released fix in 4.1.17 soon!

https://www.virtualbox.org/ticket/9887

Re: Odd shared folder / file permission issue

Posted: 3. Apr 2014, 09:51
by Ashish Man Baisyet
Hi you can add user to vboxsf operating system group. For e.g. while I was installing Oracle I have copied Oracle executable in windows machine which was mounted in /media/sf_Sharedfolder in OEL. Later I added oracle user to vboxsf group, log out oracle and then log back in then I was able to run installer directly from shared folder. No need to copy the files to the guest operating system. Command "usermod -a -G vboxsf oracle"

Hope this helps.