synced_folders/smb: set recursive ACL for folders
This commit is contained in:
parent
0037d2c767
commit
46b5f0d22b
|
@ -23,6 +23,16 @@ $grant = "Everyone,Full"
|
|||
if (![string]::IsNullOrEmpty($host_share_username)) {
|
||||
$computer_name = $(Get-WmiObject Win32_Computersystem).name
|
||||
$grant = "$computer_name\$host_share_username,Full"
|
||||
|
||||
# Here we need to set the proper ACL for this folder. This lets full
|
||||
# recursive access to this folder.
|
||||
Get-ChildItem $path -recurse -Force |% {
|
||||
$current_acl = Get-ACL $_.fullname
|
||||
$permission = "$computer_name\$host_share_username","FullControl","ContainerInherit,ObjectInherit","None","Allow"
|
||||
$acl_access_rule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission
|
||||
$current_acl.SetAccessRule($acl_access_rule)
|
||||
$current_acl | Set-Acl $_.fullname
|
||||
}
|
||||
}
|
||||
|
||||
$result = net share $share_name=$path /unlimited /GRANT:$grant
|
||||
|
|
|
@ -57,7 +57,7 @@ Hyper-V:
|
|||
```
|
||||
$ sudo apt-get install linux-tools-3.11.0-15-generic
|
||||
$ sudo apt-get install hv-kvp-daemon-init
|
||||
$ cp/usr/lib/linux-tools-3.11.0-15/hv_* /usr/sbin/
|
||||
$ sudo cp /usr/lib/linux-tools/3.11.0-15/hv_* /usr/sbin/
|
||||
```
|
||||
|
||||
## Packaging the Box
|
||||
|
|
Loading…
Reference in New Issue