[SOLVED] Virtualbox shared folders user access

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Virtualbox shared folders user access

Postby doktor5000 » Jul 22nd, '11, 12:19

Hello,

i'm currently trying to access the shared folders in my virtual machine as user.
Virtualbox documentation says that i need to be a member of vboxsf group, but that doesn't help,
as the shared folders are mounted below /media and root is the owner.
Also i don't get by what they are mounted, there is no fstab entry,
seems this is done by the guest additions. How can i change this?
I mean, not changing the permissions on the shared folder after each boot,
but doing this properly and already mount them with the correct permissions?

EDIT: Changing owner/permissions seems to have no effect:
Code: Select all
[doktor5000@localhost ~]$ ls -la /media/
insgesamt 16
drwxr-xr-x  4 root root   4096 2011-07-04 11:39 ./
drwxr-xr-x 20 root root   4096 2011-07-04 11:39 ../
drwxr-xr-x  2 root root   4096 2011-07-01 17:39 cdrom/
-rw-r--r--  1 root root      0 2011-07-04 11:39 .hal-mtab
drwxrwx---  1 root vboxsf 4096 2011-07-22 11:59 sf_VirtualBox_VMs/
[doktor5000@localhost ~]$ sudo chown -R doktor5000:vboxsf /media/sf_VirtualBox_VMs/
[doktor5000@localhost ~]$ ls -la /media/
insgesamt 16
drwxr-xr-x  4 root root   4096 2011-07-04 11:39 ./
drwxr-xr-x 20 root root   4096 2011-07-04 11:39 ../
drwxr-xr-x  2 root root   4096 2011-07-01 17:39 cdrom/
-rw-r--r--  1 root root      0 2011-07-04 11:39 .hal-mtab
drwxrwx---  1 root vboxsf 4096 2011-07-22 11:59 sf_VirtualBox_VMs/


Host is Mageia 1 x86_64, virtualbox-4.0.6-4.mga1 from the repos,
and guest is Mandriva 2010.1 with guest additions installed from the Virtualbox menu.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Virtualbox shared folders user access

Postby jkerr82508 » Jul 22nd, '11, 14:26

I think that you'll find the answers to your questions in Sections 4.3.1 and 4.3.2 of the vbox manual. Those sections explain manual and automatic mounting of shared folders. :)

Jim
jkerr82508
 
Posts: 946
Joined: Mar 26th, '11, 01:34
Location: Fife, Scotland

Re: Virtualbox shared folders user access

Postby doktor5000 » Jul 22nd, '11, 14:47

Well, actually no. As i have written above, i've already read that. And i don't want to remount the automatic mounts,
just change them [properly] so that i can access them as user. Always getting root, copying and chowning only to exchange
a small file is really tedious, you know.

So far the only option would be to use rc.local to unmount them, and mount them manually with uid/gid?
Seems i'm gonna have to ask at virtualbox forums directly, if nobody else has a hint for me.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Virtualbox shared folders user access

Postby jkerr82508 » Jul 23rd, '11, 13:29

As I read the manual, automatic mounting happens when a user logs in. Thus if the shares are mounted in fstab, they will be already mounted when automatic mounting is attempted and that should fail. However, I don't have any linux guests at present to test this.

There is an option to de-activate auto-mounting in the dialogue that is displayed when you double-click on the share in the "Shared Folders" section of the machine Settings.

Jim
jkerr82508
 
Posts: 946
Joined: Mar 26th, '11, 01:34
Location: Fife, Scotland

[SOLVED] Re: Virtualbox shared folders user access

Postby doktor5000 » Jul 23rd, '11, 15:54

No, there are no fstab entries, so it is the automatic mounting.
Only tip in virtualbox forum was to unmount them and remount them again with the proper options.

:oops:
EDIT: Well, uhhm, just forgot to reboot the guest after adding my user to the vboxsf group.
Virtualbox manual mentions this also, for every change related to shared folders the guest should be rebooted.

Problem is solved.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron