ACLs applied to VMfiles directory is ignored...
Posted: 23. Apr 2013, 22:15
I'm setting up a shared Virtualbox installation (VirtualBox 4.2.12 r84980 with extension pack installed) in /Users/Shared for all users of a Mac (only one windows license and install needed.)
One of Virtualbox's quirks is that every time it's run a new .vbox (Virtualbox definitions file) is created, with read/write rights granted only to the user that created it.
Since this is done as posix permissions:
-rw------- 1 root wheel 7578 Apr 22 09:07 Windows7.vbox
I applied an ACL to the enclosing directory at the time I created the directory:
mkdir /Users/Shared/VirtualBoxVMS
chmod -R +a "everyone allow read,write,file_inherit,directory_inherit" /Users/Shared/VirtualBoxVMS
However users are STILL not allowed to access the folder containing the vbox files: (my comments in bold italic)
pharmacyvpn117-7:Shared mike$ groups mike
staff com.apple.access_screensharing everyone _appstore localaccounts _appserverusr admin _appserveradm _lpadmin _lpoperator _developer
Local user 'mike' is a member of 'everyone'
pharmacyvpn117-7:Shared mike$ ls -lRe /Users/Shared
total 0
drwxr-xr-x+ 5 root wheel 170 Apr 19 10:21 VirtualBoxVMS
0: group:everyone allow list,add_file,file_inherit,directory_inherit
/Users/Shared/VirtualBoxVMS:
total 0
drwxr-xr-x+ 3 root wheel 102 Apr 19 10:21 HDs
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
drwxr-xr-x+ 2 root wheel 68 Apr 19 10:21 SharedWithMac
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
drwxr-xr-x+ 3 root wheel 102 Apr 19 10:21 VMfiles
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
/Users/Shared/VirtualBoxVMS/HDs:
total 50118984
-rw-------+ 1 root wheel 25660919808 Apr 22 09:07 Win7.vdi
0: group:everyone inherited allow read,write
Only root can read/write per posix permissions, but the ACL is letting mike see it.
/Users/Shared/VirtualBoxVMS/SharedWithMac:
/Users/Shared/VirtualBoxVMS/VMfiles:
total 0
drwx------+ 5 root wheel 170 Apr 22 09:07 Windows7
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
Here, mike cannot even list the contents of the directory, depite the ACL explicitly allowing it.
/Users/Shared/VirtualBoxVMS/VMfiles/Windows7:
ls: Logs: Permission denied
ls: Windows7.vbox: Permission denied
ls: Windows7.vbox-prev: Permission denied
ls: Windows7: Permission denied
And when I do ls -lRe as root via sudo, the ACLs are as expected. mike SHOULD be able to access this directory!
pharmacyvpn117-7:Shared mike$ sudo ls -lRe /Users/Shared/VirtualBoxVMS/VMfiles/Windows7
total 32
drwx------+ 3 root wheel 102 Apr 19 10:21 Logs
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
-rw-------+ 1 root wheel 7578 Apr 22 09:07 Windows7.vbox
0: group:everyone inherited allow read,write
-rw-------+ 1 root wheel 7509 Apr 22 09:07 Windows7.vbox-prev
0: group:everyone inherited allow read,write
/Users/Shared/VirtualBoxVMS/VMfiles/Windows7/Logs:
total 272
-rw-------+ 1 root wheel 135772 Apr 22 09:07 VBox.log
0: group:everyone inherited allow read,write
I have reproduced this on another Mac running 10.8.3
Anyone know why??
One of Virtualbox's quirks is that every time it's run a new .vbox (Virtualbox definitions file) is created, with read/write rights granted only to the user that created it.
Since this is done as posix permissions:
-rw------- 1 root wheel 7578 Apr 22 09:07 Windows7.vbox
I applied an ACL to the enclosing directory at the time I created the directory:
mkdir /Users/Shared/VirtualBoxVMS
chmod -R +a "everyone allow read,write,file_inherit,directory_inherit" /Users/Shared/VirtualBoxVMS
However users are STILL not allowed to access the folder containing the vbox files: (my comments in bold italic)
pharmacyvpn117-7:Shared mike$ groups mike
staff com.apple.access_screensharing everyone _appstore localaccounts _appserverusr admin _appserveradm _lpadmin _lpoperator _developer
Local user 'mike' is a member of 'everyone'
pharmacyvpn117-7:Shared mike$ ls -lRe /Users/Shared
total 0
drwxr-xr-x+ 5 root wheel 170 Apr 19 10:21 VirtualBoxVMS
0: group:everyone allow list,add_file,file_inherit,directory_inherit
/Users/Shared/VirtualBoxVMS:
total 0
drwxr-xr-x+ 3 root wheel 102 Apr 19 10:21 HDs
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
drwxr-xr-x+ 2 root wheel 68 Apr 19 10:21 SharedWithMac
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
drwxr-xr-x+ 3 root wheel 102 Apr 19 10:21 VMfiles
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
/Users/Shared/VirtualBoxVMS/HDs:
total 50118984
-rw-------+ 1 root wheel 25660919808 Apr 22 09:07 Win7.vdi
0: group:everyone inherited allow read,write
Only root can read/write per posix permissions, but the ACL is letting mike see it.
/Users/Shared/VirtualBoxVMS/SharedWithMac:
/Users/Shared/VirtualBoxVMS/VMfiles:
total 0
drwx------+ 5 root wheel 170 Apr 22 09:07 Windows7
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
Here, mike cannot even list the contents of the directory, depite the ACL explicitly allowing it.
/Users/Shared/VirtualBoxVMS/VMfiles/Windows7:
ls: Logs: Permission denied
ls: Windows7.vbox: Permission denied
ls: Windows7.vbox-prev: Permission denied
ls: Windows7: Permission denied
And when I do ls -lRe as root via sudo, the ACLs are as expected. mike SHOULD be able to access this directory!
pharmacyvpn117-7:Shared mike$ sudo ls -lRe /Users/Shared/VirtualBoxVMS/VMfiles/Windows7
total 32
drwx------+ 3 root wheel 102 Apr 19 10:21 Logs
0: group:everyone inherited allow list,add_file,file_inherit,directory_inherit
-rw-------+ 1 root wheel 7578 Apr 22 09:07 Windows7.vbox
0: group:everyone inherited allow read,write
-rw-------+ 1 root wheel 7509 Apr 22 09:07 Windows7.vbox-prev
0: group:everyone inherited allow read,write
/Users/Shared/VirtualBoxVMS/VMfiles/Windows7/Logs:
total 272
-rw-------+ 1 root wheel 135772 Apr 22 09:07 VBox.log
0: group:everyone inherited allow read,write
I have reproduced this on another Mac running 10.8.3
Anyone know why??