IOError:[Errno 13]权限被拒绝{Python}
我正在通过 FTP 制作一个文件注入程序 {用户运行程序,ftp 将另一个程序下载到远程文件夹并运行该程序} 当我尝试在我的系统中创建 32 折叠的 zip 文件时,Python 对我大喊大叫,说你不能这样做!
我可以使用一个模块来解决这个问题吗? 谢谢这是我的代码
l_zipfile = open("C:\\Program Files\\"+zipfilename, 'w'
I'm making a file injection program via FTP
{User runs program, ftp downloads another program to a distant folder and runs that program}
When I try to make a zip file in my system 32 fold python yells at me and says YOU CANT DO THAT!
Is there a module I can use to get around this?
Thanks here is my code
l_zipfile = open("C:\\Program Files\\"+zipfilename, 'w'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是操作系统级别的保护。如果有一个模块可以解决这些问题,Windows 比我想象的更糟糕,这是很多。
写入不同的目录。
That's an operating-system level protection. If there were a module to get around the problems, Windows sucks more than I think it does, which is a lot.
Write to a different directory.
使用 py2exe 编译它,然后以管理员身份运行。这对我有用。
Compile it with py2exe then run as Administrator. This worked for me.
按照以下链接中论坛的说明进行操作:
http://ubuntuforums.org/showthread.php?p =10416349
“我下载了Virtual CloneDrive(谷歌它 - 它的免费软件)当我安装Virtual CloneDrive时,我将.iso文件与它关联,而不是其他文件。然后我运行我最初下载来制作光盘的 .iso 文件,直接从我的 Program Files 文件夹中双击它应该作为虚拟驱动器安装并启动,并像光盘一样运行,但我认为访问被拒绝。错误与光盘驱动器有关,但我无法修复它。”
Follow these instructions from the forum in this link:
http://ubuntuforums.org/showthread.php?p=10416349
"I downloaded Virtual CloneDrive (google it - its freeware) When I installed Virtual CloneDrive, I associated the .iso files with it and no others. I then ran the .iso file that I originally downloaded to make my disc, directly from my Program Files folder by double-clicking. It should be mounted and launch as a virtual drive and run like the disc but without using the disc. I think the access denied error has something to do with the disc drive but I was unable to fix it."