[Solved] vdi vm for all users

Discussions related to using VirtualBox on Windows hosts.

Re: vdi vm for all users

Postby scottgus1 » 22. May 2019, 14:58

That could be useful, Martin. Strange thing is I don't get permissions problems on my guest, but Socratis & Justl do.

I see the "Give Everyone:RWX" in your list, Socratis. Was that a specific command? I didn't specifically give any permissions, I just put the files in the Public folder where Windows is supposed to allow anyone to footle about. Maybe that's the monkey-wrench?
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3656
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: vdi vm for all users

Postby socratis » 22. May 2019, 21:09

scottgus1 wrote:So Virtualbox does change permissions on the .vbox file to the account the guest is opened under
Exactly.

scottgus1 wrote:Why should it do that? Windows doesn't do it.
Security, added security. The reasons are not really obvious, because you do have the VM.vbox file in your own directory (in theory). But, for those "curious" souls that try to bypass the defaults and try to setup a shared setup, VirtualBox takes an extra step.

scottgus1 wrote:But I don't see a block or changing permissions off of RW
I do see it on my OSX shared setup. Here are two examples from a Win7 VM that I used, and a VoidLinux VM that I have not used:
-rwxrwxrwx    1 socratis  staff     7426  9 Φεβ 09:10 Void Linux.vbox
-rw------- 1 socratis staff 29485 19 Μαϊ 08:56 Windows 7.vbox

Mind you that they both started in the same rwxrwx state. I guess it's easier for Unix like permissions to be set, rather than going through the whole ACL list on Windows.

So, if I wanted to implement a shared setup, yes, it's doable for me (the whole thing is in /Users/Shared/VirtualBox), except that each time I switch users I'd have to issue a:

    sudo chmod -R 777 /Users/Shared//VirtualBox/Machines/
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 23883
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: vdi vm for all users

Postby scottgus1 » 23. May 2019, 16:59

I tried the VBOX_USER_HOME experiment in a Windows 7 host running 5.2.28. It too worked just fine. I made the system environment variable, put the .Virtualbox and Virtualbox VMs folders from C:\Users\SnC to C:\Users\Public. The GUI saw the Public guest and could open it under the two different accounts on the PC.

Maybe the account permissions change & jam-up is a Linux/Mac vs Windows thing?

Interestingly, the manual section 10.1.3 does not actually say that using the VBOX_USER_HOME variable allows multiple host accounts to see and run the same guests. It does say the variable allows an account to have multiple global configurations by changing the variable contents. So we may be using the variable in a way not intended and perhaps the added-security permissions change is exactly what the devs & customers want.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3656
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: vdi vm for all users

Postby scottgus1 » 23. May 2019, 17:00

Justl, we haven't heard from you in a few days, are you still interested in getting your problem solved? Post back & we'll keep trying.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3656
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: vdi vm for all users

Postby socratis » 23. May 2019, 23:29

scottgus1 wrote:Maybe the account permissions change & jam-up is a Linux/Mac vs Windows thing?

  • In all hosts the user that opened the file becomes the Owner and gets RW access.
  • In Unix-like permission hosts, Group/Others are denied permissions. That's easy to do with a simple 'chmod', and that's exactly what's happening.
  • In Windows it's way more tedious to change permissions (are you kidding me?). So, besides adjusting the Owner, the rest are left as they are.
  • In your case, the Owner changes, but... because Everyone has RW access, the rest of the users can RW at all times, no matter who the Owner is.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 23883
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: vdi vm for all users

Postby justl » 28. May 2019, 14:33

scottgus1 wrote:Justl, we haven't heard from you in a few days, are you still interested in getting your problem solved? Post back & we'll keep trying.

thx, sure i am.
sorry for not looking into it, i had other matters to attend to @ work in the mean time - there are always problems coming in with "higher priority".
justl
 
Posts: 9
Joined: 20. May 2019, 14:45

Re: vdi vm for all users

Postby scottgus1 » 28. May 2019, 15:37

That's OK, same happens to me.
OK, so we need to get your guest to open in any account that is logged on. We will need to get the .Virtualbox folder and the guest folder in public locations on your host PC.

First, let's see where things are. Please note, don't change or hide any names of files or folders or file contents. This info cannot compromise your host PC just by posting it here, and changing anything will result in us being unable to help you.

Did you set the VBOX_USER_HOME environment variable? If so, please post a screenshot showing that variable in the list of system variables:
Open a folder window and right-click My Computer, than choose Properties.
A 'System' window will open. On the left, click Advanced System Settings
The 'System Properties'window will appear. Click Environment Variables.
The 'Environment Variables' window will appear. Scroll the upper or lower pane to where the VBOX_USER_HOME variable is set.
Post a .PNG screenshot of the 'Environment Variables' window, showing VBOX_USER_HOME's contents, using the Upload Attachment tab at the bottom of where you type posts on this forum.

Let's confirm the contents of VBOX_USER_HOME:
Open a command prompt window, and enter this command:
echo %VBOX_USER_HOME%
Post the result of this command.

Open the main Virtualbox window, right-click your guest, and choose Show In Explorer.
The folder containing the guest files will appear. If your host OS has been set to show file extensions, you will see a .vbox file with the same name as your guest. Zip and post this file.
If your host does not show extensions, then it should be. Microsoft's decision to even allow extensions to not show is a serious security flaw. Just theortically imagine you get an email from a friend's email account telling you about a cool new song he bought and sent it to you as an MP3. Your friend has been hacked and the "CoolSong.MP3" in the attachment is really "CoolSong.MP3.exe" and contains WannaCry. All you see is "CoolSong.MP3" due to MS's default. Yikes, to say the least. You'll wanna cry... :) Google for how to turn the extensions on.

Also, please post the full path to the guest folder.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3656
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: vdi vm for all users

Postby justl » 29. May 2019, 10:30

hi,
i do know a bit about IT (20 years of working there, began with dos ... just not about virtualbox), so i am not in "need" for dummy-explanations (no offence from my side taken, no offence from my side meant) ;-)
i took the liberty to put it all in one zip attached to this post.
thx
justl
Attachments
vbox-error.zip
(52.02 KiB) Downloaded 5 times
justl
 
Posts: 9
Joined: 20. May 2019, 14:45

Re: vdi vm for all users

Postby scottgus1 » 29. May 2019, 15:08

justl wrote:i am not in "need" for dummy-explanations (no offence from my side taken

Not sure how these two statements jive...
Seems there was an interpreted offense somewhere, you want to elaborate? Since you took the time to write this we'll deal with it before I look at your info.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3656
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: vdi vm for all users

Postby socratis » 29. May 2019, 15:15

@justl
You didn't give us your resume on your way in. All we can possibly know about you is that you have a 9-day experience in the forums. You could be a n00b, you could be Larry Ellison himself, we can't know that. All we know is that you're a n00b around here, so unless proven an expert, a toned down version of explanation is needed. For everyone/anyone.

And it wasn't a toned down version to begin with!
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 23883
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: vdi vm for all users

Postby justl » 3. Jun 2019, 14:22

scottgus1 wrote:
justl wrote:i am not in "need" for dummy-explanations (no offence from my side taken

Not sure how these two statements jive...
Seems there was an interpreted offense somewhere, you want to elaborate? Since you took the time to write this we'll deal with it before I look at your info.

socratis wrote:@justl
You didn't give us your resume on your way in. All we can possibly know about you is that you have a 9-day experience in the forums. You could be a n00b, you could be Larry Ellison himself, we can't know that. All we know is that you're a n00b around here, so unless proven an expert, a toned down version of explanation is needed. For everyone/anyone.

And it wasn't a toned down version to begin with!

you may be right, that im a noob in here (i dont have a clue who larry ellison is... will look that up later)
@scottgus: like i said i didnt take any offence for a noob explanation (for dos/windows), you surely didnt mean in a bad way - since english isnt my main language i may have put a bit too much local grammar in my answer (no offence meant).
@socratis: i dont understand what you exactly mean with "toned down version of explanation" - i stated my problem at the beginning of the thread with as much detail for me possible.

justl
justl
 
Posts: 9
Joined: 20. May 2019, 14:45

Re: vdi vm for all users

Postby scottgus1 » 3. Jun 2019, 15:13

Sounds fine! No problem, Justl, we'll press on!

I think the solution to your problem will be easy. Your VBOX_USER_HOME points to C:\VMBox-Ordner\.Virtualbox. This environment variable needs to be in the "System Variables" box, so if it is in the "User Variables for {username}" box it will need to be moved over. Also this folder needs to have full-control access for every account that will log in. Usually, non-system-generated folders in the root of a drive aren't specially protected by special permissions. If any permissions changes were made to this folder, these permissions will have to allow full control to anyone who will use the guest. (User "Everyone" with full control will get all possible users.)

Your guest folder (the one with the .vbox file) is in "C:\Users\u442583adm\VirtualBox VMs\IH_NB_Dyn". Here's where your "access denied" problem probably stems from. The guest folder needs to be in a public folder that all users have full-control access to. C:\Users\Public is good. If permissions are permissive enough, C:\VMBox-Ordner\.Virtualbox may work. However, the location of your guest's .vdi on the D: drive suggests a better solution:

It is perfectly OK to put a guest drive on another drive besides the C: drive. But not having the vdi in the same folder as all of the guest's other files & folders makes the suggested backup process harder. You will find that the path to the guest vdi stored in the .vbox file is an absolute path "D:/test/IH_NB_Dyn.vdi". If you tried to back up then restore or move this guest as is using the Moving a VM tutorial you would require a D: drive and a "test" folder therein on the destination PC.

The best setup for a guest is to have the guest vdi in the guest folder along with the guest's .vbox file. Then the paths are relative and "Moving a VM" (or "Backing Up a VM" if you interpret the tutorial differently) is tremendously easier. It involves just copying the guest folder to any drive on the new PC and registering the guest. No fancy drive lettering & folder making needed.

I have two suggestions you could do. Note that these suggestions have a special process to complete or the Virtualbox guest will be broken, so please just let us know which suggestion you would like to go with before doing anything to your Virtualbox setup.

I would suggest consolidating the guest by moving the guest folder IH_NB_Dyn with the .vbox in it to the D:\test folder, then moving the vdi into the D:\test\IH_NB_Dyn folder. The paths stored in the .vbox will be relative and the guest can be moved/backed up easily.

If you really want to keep the .vbox on C: and the guest vdi on D:, then I suggest moving the C:\Users\u442583adm\VirtualBox VMs\IH_NB_Dyn folder to either C:\Users\Public first, or C:\VMBox-Ordner, if you're sure the permissions are full wide open. (The guest would be in C:\VMBox-Ordner, not C:\VMBox-Ordner\.Virtualbox, so Virtualbox can keep all its files separate.)

Please let us know which way you want to go, then we will tell you the procedure to take to keep your guest working.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3656
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: vdi vm for all users

Postby justl » 4. Jun 2019, 10:40

scottgus1 wrote:
If you really want to keep the .vbox on C: and the guest vdi on D:, then I suggest moving the C:\Users\u442583adm\VirtualBox VMs\IH_NB_Dyn folder to either C:\Users\Public first, or C:\VMBox-Ordner, if you're sure the permissions are full wide open. (The guest would be in C:\VMBox-Ordner, not C:\VMBox-Ordner\.Virtualbox, so Virtualbox can keep all its files separate.)

Please let us know which way you want to go, then we will tell you the procedure to take to keep your guest working.

hi,
i would rather go with this solution, cause it is handled that way on all our virtual machines (so there is no confusion if maybe the os gets broken or something else happens).
thx
justl
justl
 
Posts: 9
Joined: 20. May 2019, 14:45

Re: vdi vm for all users

Postby scottgus1 » 4. Jun 2019, 13:43

Very good! Here's how to move the guest:

Be sure there is nothing in the guest CD drive.

Be sure the guest is completely shut down, not Save-Stated.

In the main Virtualbox window, right-click the guest and choose "Show in Explorer". This will open a File Explorer window inside the guest's folder. Move the File Explorer window up one level so you can see the guest folder icon itself.

In the main Virtualbox window, right-click the guest and choose "Remove", then choose "Remove Only". Don't choose "Delete all files" or that's exactly what will happen, and there will be no Recycle Bin second chance: the guest will be unrecoverably gone.

Close the Virtualbox main window.

Move the guest folder and all files therein to the desired folder, C:\VMBox-Ordner or C:\Users\Public.

Open the guest folder and double-click the guest .vbox file. The main Virtualbox window will re-open and the guest will be back. Try running the guest. Then log off and into other accounts and try the guest again.

If you put the guest in C:\VMBox-Ordner and you can't get the guest to start in other accounts (access-denied), first see if the guest .vbox file has strange permissions attached to it. Try removing these, comparing this .vbox file's permissions with a new guest's .vbox file. Also try these instructions again, putting the guest in C:\Users\Public.

Once you get the guest starting in all accounts, change the main Virtualbox window's default new guest folder (File menu, Preferences, General, Default Machine Folder) to the folder the guest is in now.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3656
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: vdi vm for all users

Postby justl » 7. Jun 2019, 10:18

thx, will try it out next week (couldnt get to it this week) and will post back any outcome
justl
Last edited by socratis on 7. Jun 2019, 11:38, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
justl
 
Posts: 9
Joined: 20. May 2019, 14:45

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 29 guests