Possible VirtualBox.xml permissions bug
Posted: 15. Jun 2010, 19:31
Hi,
Running VirtualBox 3.2.4 on Solaris. If 2 users want to share Virtualbox configuration data, they can both set their VBOX_USER_HOME variable to the same place and change the permissions on VirtualBox.xml to be permissive to both. However once one user makes any modification which causes a write to the $VBOX_USER_HOME/VirtualBox.xml file, it clobbers the file permissions on the $VBOX_USER_HOME/VirtualBox.xml file. This means that 2 users can never share access to VirtualBox machines. Is this a bug or an RFE?
Cheers,
Ronan
e.g.
# useradd -d /export/home/u1 -m -s /bin/bash u1
# useradd -d /export/home/u2 -m -s /bin/bash u2
# mkdir /opt/vbh
# chmod 777 /opt/vbh
# mkdir /opt/vbh/Machines
# chmod 777 /opt/vbh/Machines
# su - u1
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
-bash-3.00$ export VBOX_USER_HOME=/opt/vbh
-bash-3.00$ VBoxManage createvm --name vb1 --ostype Solaris --settingsfile /opt/vbh/Machines/vb1.xml --register
Oracle VM VirtualBox Command Line Management Interface Version 3.2.4
(C) 2005-2010 Oracle Corporation
All rights reserved.
Virtual machine 'vb1' is created and registered.
UUID: 3c6c8dbd-e97f-4681-baa0-078066de6422
Settings file: '/opt/vbh/Machines/vb1.xml'
-bash-3.00$ ls -la /opt/vbh/VirtualBox.xml
-rw------- 1 u1 other 900 Jun 15 19:12 /opt/vbh/VirtualBox.xml
-bash-3.00$ chmod 777 /opt/vbh/VirtualBox.xml
-bash-3.00$ ls -la /opt/vbh/VirtualBox.xml
-rwxrwxrwx 1 u1 other 900 Jun 15 19:12 /opt/vbh/VirtualBox.xml
-bash-3.00$ exit
logout
# su - u2
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
-bash-3.00$ export VBOX_USER_HOME=/opt/vbh
-bash-3.00$ VBoxManage createvm --name vb2 --ostype Solaris --settingsfile /opt/vbh/Machines/vb2.xml --register
Oracle VM VirtualBox Command Line Management Interface Version 3.2.4
(C) 2005-2010 Oracle Corporation
All rights reserved.
Virtual machine 'vb2' is created and registered.
UUID: fcde1a27-f7f2-4c22-8a45-60924fc45f8e
Settings file: '/opt/vbh/Machines/vb2.xml'
-bash-3.00$ ls -la /opt/vbh/VirtualBox.xml
-rw------- 1 u2 other 1000 Jun 15 19:14 /opt/vbh/VirtualBox.xml
Running VirtualBox 3.2.4 on Solaris. If 2 users want to share Virtualbox configuration data, they can both set their VBOX_USER_HOME variable to the same place and change the permissions on VirtualBox.xml to be permissive to both. However once one user makes any modification which causes a write to the $VBOX_USER_HOME/VirtualBox.xml file, it clobbers the file permissions on the $VBOX_USER_HOME/VirtualBox.xml file. This means that 2 users can never share access to VirtualBox machines. Is this a bug or an RFE?
Cheers,
Ronan
e.g.
# useradd -d /export/home/u1 -m -s /bin/bash u1
# useradd -d /export/home/u2 -m -s /bin/bash u2
# mkdir /opt/vbh
# chmod 777 /opt/vbh
# mkdir /opt/vbh/Machines
# chmod 777 /opt/vbh/Machines
# su - u1
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
-bash-3.00$ export VBOX_USER_HOME=/opt/vbh
-bash-3.00$ VBoxManage createvm --name vb1 --ostype Solaris --settingsfile /opt/vbh/Machines/vb1.xml --register
Oracle VM VirtualBox Command Line Management Interface Version 3.2.4
(C) 2005-2010 Oracle Corporation
All rights reserved.
Virtual machine 'vb1' is created and registered.
UUID: 3c6c8dbd-e97f-4681-baa0-078066de6422
Settings file: '/opt/vbh/Machines/vb1.xml'
-bash-3.00$ ls -la /opt/vbh/VirtualBox.xml
-rw------- 1 u1 other 900 Jun 15 19:12 /opt/vbh/VirtualBox.xml
-bash-3.00$ chmod 777 /opt/vbh/VirtualBox.xml
-bash-3.00$ ls -la /opt/vbh/VirtualBox.xml
-rwxrwxrwx 1 u1 other 900 Jun 15 19:12 /opt/vbh/VirtualBox.xml
-bash-3.00$ exit
logout
# su - u2
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
-bash-3.00$ export VBOX_USER_HOME=/opt/vbh
-bash-3.00$ VBoxManage createvm --name vb2 --ostype Solaris --settingsfile /opt/vbh/Machines/vb2.xml --register
Oracle VM VirtualBox Command Line Management Interface Version 3.2.4
(C) 2005-2010 Oracle Corporation
All rights reserved.
Virtual machine 'vb2' is created and registered.
UUID: fcde1a27-f7f2-4c22-8a45-60924fc45f8e
Settings file: '/opt/vbh/Machines/vb2.xml'
-bash-3.00$ ls -la /opt/vbh/VirtualBox.xml
-rw------- 1 u2 other 1000 Jun 15 19:14 /opt/vbh/VirtualBox.xml