try: sav_ftp.chdir("/unicorn-bs.com/www/savorsk/") print "We are on FTP" sav_ftp.upload("D:\\savorsk\\folder1", "/unicorn-bs.com/www/savorsk/") except OSError: print "Error" 

For some reason, the error crashes: IOError: [Errno 13] Permission denied: 'D: \ savorsk \ folder1'

I can not understand the reason ...

  • Well, in the error it says that you have no rights for this operation. - Donil
  • Why not? I have rights. - Dmitry Bubnenkov
  • Apparently, you still do not have permission to upload - Donil
  • There is permission, it is a problem of the module itself, which cannot read only directories to send to the server. However, the read only attribute is not persistently removed from me. After re-opening the properties it stands again. - Dmitry Bubnenkov
  • This is IO Error, no rights to read the contents of 'D: \ savorsk \ folder1' Try simply listing the files in the directory or read some file from there. ____ And yes, you need to upload one file at a time or use some other library on stackoverflow.com/questions/5663787/… - zb '

1 answer 1

You are not authorized to access or write to this folder.
Check chmod.

And further. Are you trying to upload a folder to a folder?

I think this function only works with files. You need to call it for each file sav_ftp.upload ("D: \ savorsk \ folder1", "/unicorn-bs.com/www/savorsk/")

  • Yes, folder to folder. There are rights, my opinion, why it does not work, Donil wrote in the answer. The option to call for each file is too inconvenient for me. Are there any other options? - Dmitry Bubnenkov
  • you tried to use ftp via some kind of ftp client and upload something to this folder try filezilla or total comander - Alexander Banov