Access Ubuntu Host Shared Folder as different user

Discussions about using Windows guests in VirtualBox.
Post Reply
SCAI_Andre
Posts: 3
Joined: 17. Apr 2012, 10:00

Access Ubuntu Host Shared Folder as different user

Post by SCAI_Andre »

Hi,

Ubuntu 11.10 Host
Windows XP Guest
Shared Folder /tmp

If I access the shared folder all new files created from the guest are owned by the virtualbox user.

I know that I can define the uid and gid used to access the files in the shared folder when using a linux client (as a parameter to the mount command).

But is this possible when using a Windows guest, too? I have not found an answer to this...

TIA

Regards,
Andre
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: Access Ubuntu Host Shared Folder as different user

Post by frank »

This is not possible of course because a user cannot create files of another user on Unix. This is no VirtualBox problem but just policy on Unix. For the same reason you cannot grant a file to a different user.
SCAI_Andre
Posts: 3
Joined: 17. Apr 2012, 10:00

Re: Access Ubuntu Host Shared Folder as different user

Post by SCAI_Andre »

ok, I just got the impression that at least using a unix guest this was possible.

See here viewtopic.php?t=15868 (cannot post URLs, yet, so I crippled it - refers to a post in this forum)
sudo mount -t vboxsf -o uid=1000,gid=1000 share ~/host
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: Access Ubuntu Host Shared Folder as different user

Post by frank »

Yes, this is possible for the guest because the mount option is passed to the kernel and will define the user/group all files of the mapped share. But files on the host are not accessed through a VirtualBox kernel driver but just through the normal Unix file I/O interface, therefore these options are not available on the host. And this is also implemented as desired for security reasons.
Post Reply