title: How to upload file to directory that is up from home directory using FTP in RCurl?
body: <p>I need to upload a file using FTP in R, but the directory is up from my home directory on the server. When I run the following code using RCurl, I get this error: <code>550 var: No such file or directory</code>: </p>
  
  <pre><code>ftpUpload(what = "./plots/daily/LastTwentyFour.png",
        to = "ftp://spider/../../var/www/dashboard/img/LastTwentyFour.png",
        verbose = TRUE,
        userpwd = "REDACTED:REDACTED")
  </code></pre>
  
  <p>More specifically, I get this output:</p>
  
  <pre><code>&gt; PWD
  &lt; 257 "/home/dhadley" is the current directory
  * Entry path is '/home/dhadley'
  &gt; CWD var
  * ftp_perform ends with SECONDARY: 0
  &lt; 550 var: No such file or directory
  * Server denied you to change to the given directory
  * Connection #0 to host spider left intact
  Error in function (type, msg, asError = TRUE)  : 
  Server denied you to change to the given directory
  </code></pre>
  
  <p>It works when I try to upload to my home directory:</p>
  
  <pre><code>ftpUpload(what = "./plots/daily/LastTwentyFour.png",
        to = "ftp://spider/LastTwentyFour.png",
        verbose = TRUE,
        userpwd = "REDACTED:REDACTED")
  </code></pre>
  
  <p>I guess the question is, how do I navigate between directories within the ftpUpload function? Or, if there is another way to upload a file from Windows to a Linux server in R, I am open to that too. Thanks in advance!</p>
  
  <p>EDIT: I have write access to the directory in question, and am able to upload files in FileZilla. I cannot change my home directory on the server, unfortunately.   </p>