Page 1 of 1

Access Ubuntu Host Shared Folder as different user

Posted: 17. Apr 2012, 10:03
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

Re: Access Ubuntu Host Shared Folder as different user

Posted: 17. Apr 2012, 13:39
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.

Re: Access Ubuntu Host Shared Folder as different user

Posted: 17. Apr 2012, 13:47
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

Re: Access Ubuntu Host Shared Folder as different user

Posted: 17. Apr 2012, 22:50
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.