简体   繁体   English

Ansible Windows win_unzip 方法 System.IO.Compression.ZipFile 使用 3 个参数调用 ExtractToFile 的异常访问路径被拒绝

[英]Ansible Windows win_unzip Method System.IO.Compression.ZipFile Exception calling ExtractToFile with 3 argument Access to the path is denied

Using :使用 :

  win_unzip:
        src: "D:\program64\my\app\binaries.zip"
        dest: "D:\program64\my\app\"
        delete_archive: yes

i get :我明白了:

TASK [ Unzip zip file] ****************************
17:19:01            fatal: [myhost]: FAILED! => {"changed": true, "dest": "D:\program64\my\app\", "msg": 
"Error unzipping 'D:\program64\my\app\binaries.zip' to 'D:\program64\my\app\'!. Method: 
System.IO.Compression.ZipFile, Exception: Exception calling \"ExtractToFile\" with \"3\" argument(s): 
\"Access to the path 'D:\program64\my\app\my_app.exe' is denied.\"", "removed": false, "src": 
"D:\program64\my\app\binaries.zip"}

I check and there was no my_app.exe , when i did the extract manually it worked, i check also the policy they were ok, i think it is linked more to Windows than Ansible but can't figure out why and how.我检查并没有my_app.exe ,当我手动提取它时,它起作用了,我还检查了它们是否正常的策略,我认为它与 Windows 的链接比 Ansible 的更多,但无法弄清楚原因和方式。

PS : Using Kerberos auth manual. PS:使用 Kerberos 身份验证手册。

Thanks,谢谢,

在我的情况下 src: 意外地是一个文件夹而不是一个文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Ansible win_unzip模块需要很长时间 - Ansible win_unzip Module takes far to long System.ComponentModel.Win32Exception:访问被拒绝 - System.ComponentModel.Win32Exception : Access is denied 在Powershell中带有io.compression.zip文件的Anomoly - Anomoly with io.compression.zipfile in Powershell Python 上 Windows:有时在调用 win32gui.SetForegroundWindow() 时“访问被拒绝” - Python on Windows: "Access is denied" sometimes when calling win32gui.SetForegroundWindow() Process.Start 在 Windows XP 机器上抛出 Win32 异常访问被拒绝 - Process.Start throws Win32 Exception Access is Denied on Windows XP Machines 拒绝访问路径“C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache\Content.IE5” - Access to the path 'C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache\Content.IE5' is denied 拒绝访问使用 python 创建的 zipfile - Access Denied to zipfile created using python JNA:com.sun.jna.platform.win32.Win32Exception-访问被拒绝 - JNA:com.sun.jna.platform.win32.Win32Exception- access denied Visual Studio 2019:System.UnauthorizedAccessException:“访问路径“C:/”被拒绝 - Visual Studio 2019: System.UnauthorizedAccessException: "Access to the path "C:/" was denied 在 Windows 上运行 Kafka,但获取日志文件夹的访问被拒绝异常 - Running Kafka on Windows but getting Access denied exception for logs folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM