IOError: [Errno 13] Permission denied {Python}

4.3k views Asked by At

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'

3

There are 3 answers

0
P'sao On

Compile it with py2exe then run as Administrator. This worked for me.

3
Michael Lorton On

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.

0
JustBeingHelpful On

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."