diff --git a/plugins/synced_folders/smb/scripts/set_share.ps1 b/plugins/synced_folders/smb/scripts/set_share.ps1 index ea24995fd..f6dcc9074 100644 --- a/plugins/synced_folders/smb/scripts/set_share.ps1 +++ b/plugins/synced_folders/smb/scripts/set_share.ps1 @@ -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 diff --git a/website/docs/source/v2/hyperv/boxes.html.md b/website/docs/source/v2/hyperv/boxes.html.md index a783720c0..bf4afa9ea 100644 --- a/website/docs/source/v2/hyperv/boxes.html.md +++ b/website/docs/source/v2/hyperv/boxes.html.md @@ -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