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 am using a separate HDD as a disk for my Virtualbox machine. I have made a vmdk using the tutorial provided in the VirtualBox manual, but in order for the machine to run I have to constantly change the owner and group of the /dev/sdb device to the user I am logged in with.

Time after time permissions get reset back to root:disk, and I'm not certain when exactly that happens. What can I do to change the owner and group permanently or maybe to not have to do it at all?

share|improve this question
    
Either you use the whole device ( /dev/sdb ) or you create a vmdk file, not both. If you have a vmdk file then you need permissions for that file, not /dev/sdb. –  psusi Dec 14 '12 at 15:19
    
@psusi, no, you need to create a vmdk in both cases, check out the docs I have linked to. –  Igor Zinov'yev Dec 14 '12 at 19:02

1 Answer 1

up vote 3 down vote accepted

The probably simplest and best way to fix the problem is adding your user to disk group.

sudo adduser %user disk

Then logoff and login back, you should able to interact with hard drive from Virtualbox.

share|improve this answer
    
This solution has occurred to me, but what confused me initially was the device's permissions. They are set to brw-rw---, doesn't that mean that only root can boot from this device? –  Igor Zinov'yev Dec 14 '12 at 19:04
    
No, the second set of permissions rw- are for the group (disk). –  Javier Rivera Dec 18 '12 at 8:55

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.