Odd shared folder / file permission issue

Discussions about using Linux guests in VirtualBox.
Post Reply
insano5000
Posts: 3
Joined: 11. Nov 2011, 05:07
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Ubuntu

Odd shared folder / file permission issue

Post 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 10015 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?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Odd shared folder / file permission issue

Post 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.
insano5000
Posts: 3
Joined: 11. Nov 2011, 05:07
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Odd shared folder / file permission issue

Post 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.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Odd shared folder / file permission issue

Post 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.
insano5000
Posts: 3
Joined: 11. Nov 2011, 05:07
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Odd shared folder / file permission issue

Post by insano5000 »

As suggested above, here is the ticket url for anyone else following this issue.

https://www.virtualbox.org/ticket/9887
mtsmit2
Posts: 1
Joined: 23. Nov 2011, 10:46
Primary OS: Mac OS X Leopard
VBox Version: OSE Debian
Guest OSses: Ubuntu

Re: Odd shared folder / file permission issue

Post 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?
Andrew Vit
Posts: 2
Joined: 23. May 2012, 22:59

Re: Odd shared folder / file permission issue

Post 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.
Andrew Vit
Posts: 2
Joined: 23. May 2012, 22:59

Re: Odd shared folder / file permission issue

Post 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
Ashish Man Baisyet
Posts: 2
Joined: 13. Dec 2013, 13:59

Re: Odd shared folder / file permission issue

Post 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.
Post Reply