none
Release Management 远程发布到VM总是显示Access is denied RRS feed

  • 问题

  • 利用release management build完project以后, 想通过windows machine file copy来发布到VM上, 但是release的log总是出现下面错路而失败

    1. 2017-02-10T08:20:14.7026984Z ##[section]Starting: Copy files from $(System.DefaultWorkingDirectory)/FREImportTool/drop
    2. 2017-02-10T08:20:14.7506981Z ==============================================================================
    3. 2017-02-10T08:20:14.7506981Z Task         : Windows Machine File Copy
    4. 2017-02-10T08:20:14.7506981Z Description  : Copy files to remote machine(s)
    5. 2017-02-10T08:20:14.7506981Z Version      : 1.0.39
    6. 2017-02-10T08:20:14.7506981Z Author       : Microsoft Corporation
    7. 2017-02-10T08:20:14.7506981Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=627415)
    8. 2017-02-10T08:20:14.7506981Z ==============================================================================
    9. 2017-02-10T08:20:14.7876985Z Preparing task execution handler.
    10. 2017-02-10T08:20:18.9867177Z Executing the powershell script: D:\a\_tasks\WindowsMachineFileCopy_731004d4-1d66-4f70-8c05-638018b22210\1.0.39\WindowsMachineFileCopy.ps1
    11. 2017-02-10T08:20:27.2735789Z Copy started for - '52.160.105.120'
    12. 2017-02-10T08:20:27.8996568Z 
    13. 2017-02-10T08:20:27.8996568Z -------------------------------------------------------------------------------
    14. 2017-02-10T08:20:27.8996568Z    ROBOCOPY     ::     Robust File Copy for Windows                              
    15. 2017-02-10T08:20:27.8996568Z -------------------------------------------------------------------------------
    16. 2017-02-10T08:20:27.8996568Z 
    17. 2017-02-10T08:20:28.0238503Z   Started : Friday, February 10, 2017 8:20:27 AM
    18. 2017-02-10T08:20:28.0238503Z 2017/02/10 08:20:28 ERROR 5 (0x00000005) Getting File System Type of Destination \\52.160.105.120\E$\FREImportTool\
    19. 2017-02-10T08:20:28.0238503Z Access is denied.
    20. 2017-02-10T08:20:28.0238503Z 
    21. 2017-02-10T08:20:28.0238503Z 
    22. 2017-02-10T08:20:28.0238503Z    Source : D:\a\r1\a\FREImportTool\drop\
    23. 2017-02-10T08:20:28.0238503Z      Dest - \\52.160.105.120\E$\FREImportTool\
    24. 2017-02-10T08:20:28.0238503Z 
    25. 2017-02-10T08:20:28.0238503Z     Files : *.*
    26. 2017-02-10T08:20:28.0238503Z 	    
    27. 2017-02-10T08:20:28.0238503Z   Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30 
    28. 2017-02-10T08:20:28.0238503Z 
    29. 2017-02-10T08:20:28.0238503Z ------------------------------------------------------------------------------
    30. 2017-02-10T08:20:28.4046247Z 
    31. 2017-02-10T08:20:28.4046247Z 2017/02/10 08:20:28 ERROR 5 (0x00000005) Creating Destination Directory \\52.160.105.120\E$\FREImportTool\
    32. 2017-02-10T08:20:28.4046247Z Access is denied.
    33. 2017-02-10T08:20:28.4046247Z 
    34. 2017-02-10T08:20:28.5287134Z \\52.160.105.120 was deleted successfully.
    35. 2017-02-10T08:20:28.5287134Z 
    36. 2017-02-10T08:20:28.5727143Z ##[error]System.Management.Automation.RuntimeException: Copying failed for resource : 52.160.105.120
    37. 2017-02-10T08:20:28.5727143Z Copying failed. Consult the robocopy logs for more details. ---> System.Management.Automation.RuntimeException: Copying failed for resource : 52.160.105.120
    38. 2017-02-10T08:20:28.5727143Z Copying failed. Consult the robocopy logs for more details.
    39. 2017-02-10T08:20:28.5727143Z    --- End of inner exception stack trace ---
    40. 2017-02-10T08:20:28.5727143Z    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
    41. 2017-02-10T08:20:28.5727143Z    at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
    42. 2017-02-10T08:20:28.5727143Z    at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
    43. 2017-02-10T08:20:28.5727143Z    at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
    44. 2017-02-10T08:20:28.5727143Z    at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
    45. 2017-02-10T08:20:28.5727143Z    at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
    46. 2017-02-10T08:20:28.5827128Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
    47. 2017-02-10T08:20:28.5847129Z ##[section]Finishing: Copy files from $(System.DefaultWorkingDirectory)/FREImportTool/drop

    VM是Azure上的VM,连接到physical的server上, 尝试过换用Azure File Copy还是会有权限的错误。 在VM上也更改过目标文件夹的访问权限,但是依然是同样的错。不知道什么原因

    2017年2月10日 8:33

全部回复

  • Hi Neil Qin,

    Thank you for posting here.

    我建议你可以:

    1. 尝试在目标机器上创建一个新的文件夹,共享这个文件夹,使所有用户在这个文件夹路径上具有 读\写 权限。

    2. 尝试在Machines使用计算机的名字加端口,或者IP加端口。

    3. 确保Admin login 和 password是正确的。

    4. 确保destination folder是正确的,你可以直接在目标机器上右击这个文件夹>>属性>>共享>>网络路径, 然后直接把这个路径复制,黏贴到destination folder里面。

    Best Regards

    Limitxiao Gao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2017年2月13日 6:32