title: Cannot delete a SFTP file using cURL
body: <p>I have a weird issue with deleting or using <code>rm</code> with cURL. It works just fine when I try to delete or move files using the same credentials on FileZilla, but doesn't work when running it through cURL. Do I have any issues with my code?</p>
  
  <pre><code>    $ch = curl_init();
  
      curl_setopt($ch, CURLOPT_URL, $sftp_server.$file_name);
      curl_setopt($ch, CURLOPT_USERPWD,$user_pwd);
      curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,1); 
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
      curl_setopt($ch, CURLOPT_PROTOCOLS,CURLPROTO_SFTP);
      curl_setopt($ch, CURLOPT_QUOTE, array('rm ~/folder/' . $file_name));
  
      curl_exec($ch);
  
      curl_close($ch);
  </code></pre>
  
  <p>I also don't have any issues downloading SFTP files using cURL.</p>
  
  <p>When I <code>var_dump()</code> the curl result I get a permission denied "<strong>curl: (21) rm command failed: Permission denied</strong>".</p>
  
  <p>Thanks for your help!</p>