Page 1 of 1

Guest system permission on host machine

Posted: 26. Nov 2014, 17:56
by Steve W.
I've been mounting host drives on my guest system, using the standard method:

Code: Select all

sudo mount -t vboxsf -o <options> host_drive /path/to/guest 
and I've run into permission problems along the way. That is, files that I have rwx access to on the host system I have only r access (or no access at all!). I have monkeyed with the uid and gid options, but I don't quite understand that option very well. Ultimately, I have fixed this by changing the permissions on my host machine. But this has got me thinking about how the guest machine is interpreted by the host. So here are my questions for the board:

1. What level user is the guest machine on the host system for the purpose described above? It clearly isn't me, but is it ME (obvs, not), staff, or everyone? I've not been experimenting with this much, I've just set the permissions to rw/rwx for everyone...
2. Can I set up an account on my host machine so that the guest system has proper access to the files on the host? Specifically, can I set it up so that the guest system has the same privileges that my account does on the host? It would get tedious to have to change the permissions each time I mount a different directory.

Re: Guest system permission on host machine

Posted: 26. Nov 2014, 19:09
by loukingjr

Re: Guest system permission on host machine

Posted: 26. Nov 2014, 21:46
by ChipMcK
Reads like you checked Read-only when you, in the Shared Folders tab, defined the folder to be shared.

Re: Guest system permission on host machine

Posted: 26. Nov 2014, 23:32
by Steve W.
@ChipMcK - Read only was NOT checked. The problem seems to be that the host doesn't recognize the guest as a privileged enough user. When I changed the folder permissions on the host, my problem went away. I'm just trying to figure out what permissions the host will natively give the guest.

@loukingjr - I'm not sure where to start with this. I'll attach some stuff that may or may not be helpful. I've just started fiddling with this kind of thing, so I'm not sure where to start looking for this. I installed guest additions, but I'm not sure how to figure out the version number and all of that potentially useful info.

Re: Guest system permission on host machine

Posted: 27. Nov 2014, 00:33
by loukingjr
Can you attach the vbox.log (compressed) file for your guest?

You need to add your username to the vboxsf group in the guest and you have to have the guest additions installed if you haven't already.

Re: Guest system permission on host machine

Posted: 27. Nov 2014, 00:45
by ChipMcK
Steve W. wrote: what permissions the host will natively give the guest.
Is Volume containing folder external or secondary (not system/boot)?

Re: Guest system permission on host machine

Posted: 27. Nov 2014, 02:35
by Steve W.
@loukingjr - I don't see a vbox.log file. Should it be in /var/log ?

@ChipMcK - Which volume, on the host or the guest? Host volume is ~/Desktop/<shared_dir>. Guest volume is ~/Documents/<shared_dir>.

Re: Guest system permission on host machine

Posted: 27. Nov 2014, 02:40
by loukingjr
with virtualbox open, right click on the guest's name in the left column> show log>save.

Re: Guest system permission on host machine

Posted: 27. Nov 2014, 02:48
by Steve W.
Thanks. VBox.log attached

One of the things that I've really struggled with from the documentation is knowing whether to do something on the _host_ or the _guest_ system.

Re: Guest system permission on host machine

Posted: 27. Nov 2014, 02:59
by ChipMcK
Steve W. wrote:~/Desktop
That normally is on the system volume

Re: Guest system permission on host machine

Posted: 27. Nov 2014, 09:37
by loukingjr
I found part of the problem if not all.
00:01:30.005205 Guest Additions information report: Version 4.2.18 r88780 '4.2.18_OSE'
The OSE guest additions from openSUSE are installed and they are out of date. Plus the OSE additions from openSUSE don't support shared folders. You need to uninstall them then install the matching GAs fron the VirtualBox devices menu. You most likely need to install the gcc and kernel-default-dev packages before they will build. I haven't used openSUSE for almost two years so I might be forgetting another package that is needed.

Re: Guest system permission on host machine

Posted: 1. Dec 2014, 19:52
by Steve W.
Thanks for the help over the holiday. (At least it is a holiday in the USA, not sure if you are here or not, still, the thanks are in order.) :D

gcc package installed. kernel-default-dev is not a package on openSUSE. According to the documentation I also need make, so that is installed. I'm following section 4.2.2.1.3. openSUSE of the documentation for now and will advise if I have another problem. I will need to figure out how to properly update the guest additions, but that is probably in the documentation if I RT(f)M.

Re: Guest system permission on host machine

Posted: 1. Dec 2014, 21:11
by loukingjr
Welcome and yes, in the US. Happy belated TDay as well.

I might have the package name backwards. it might have been Kernel-Dev-Default.

Re: Guest system permission on host machine

Posted: 2. Dec 2014, 00:57
by Steve W.
Finally got it working. Had to add my username to the `vboxsf` group in YaST. Also have to add `-o uid=1000,gid=100` to my mounting command. Now _I_ am the owner of the files on my VM.

Thanks for the help!