title: Python FTP won't Transfer
body: <p>I don't know what I'm doing wrong but this small ftp code won't transfer files. I keep getting </p>
  
  <p>File "example.py", line 11, in ?
      ftp.storlines("STOR " + file, open(file))</p>
  
  <p>ftplib.error_perm: 550 /home/helen/docs/example.txt: Operation not permitted</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import ftplib
  
  file = '/home/helen/docs/example.txt'     
  ftp = ftplib.FTP('domain', 'user', 'password')
  print "File List: "
  files = ftp.dir()
  
  ftp.cwd("/upload/")
  
  ftp.storlines("STOR " + file, open(file))
  
  f.close()                               
  s.quit()
  </code></pre>
  
  <p>Any help would be appreciated.</p>