Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was not able to access the VirtualBox shared folder, so I made the user part of the vboxsf group. But, still not able to access it. Rebooting the guest resolved the problem. Is it a bug? A reboot is not required to add a user to a group.

sudo usermod -a -G vboxsf praveensripati

There was similar query here.

I am using 11.10 and don't remember seeing similar behavior in 11.04.

share|improve this question
    
thanks for posting above. I was having the same issue and did not think to reboot!! Still a bug but atleast i now know that rebooting solves the problem :) –  ToughPal Aug 9 '13 at 11:29

2 Answers 2

up vote 10 down vote accepted

After making modifications to the groups of an user, the changes are not immediately visible. You need to re-login for that (which is accomplished with a reboot as well).

You can test which you belong to with the id -Gn command. After adding yourself to a random group, you'll notice that the group is not immediately visible in the output of that command. If you do not want to restart the graphical session ("re-login"), perform a direct login:

su - $USER

Enter your password and you'll be logged in with the new group settings applied. From there, start virtualbox and try it again. Note that you'll have to keep the console open now (unless using screen) so it might be easier to re-login.

share|improve this answer
    
Thanks sir - got it :) –  Praveen Sripati Oct 19 '11 at 13:00
1  
Tiny note: you don't need to re-login to be part of the group: calling newgr vboxsf, after the adduser USER vboxsf (or usermod, as used in the question) will let you join the group. –  invernizzi May 7 '13 at 16:21
    
@invernizzi I think you meant newgrp. It looks like a new shell is opened (similar to su), but without having to enter a password. Thanks for the tip! –  Lekensteyn May 7 '13 at 20:46

Did you try passing the UID and GID to the mount command? Like this:

sudo mount -t vboxsf -o uid=1000,gid=1000 sharedfolder mountPoint
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.