title: How to change directory permissions/chmod on FTP server using FtpWebRequest/WebRequest (C#)?
body: <p>How to change directory permissions on FTP server using FtpWebRequest/WebRequest (C#)?</p>
  
  <p>I've tried this, but without success (ftp unsupported method exception):</p>
  
  <pre><code>ftpPath = ftpPath.Replace(dirname, "");
  var request = (FtpWebRequest)WebRequest.Create(ftpPath);
  request.Credentials = new NetworkCredential(config.FtpUser, config.FtpPassword);
  request.UsePassive = true;
  request.UseBinary = true;
  
  request.Method = "CHMOD 777 " + dirname;
  
  using (var resp = (FtpWebResponse)request.GetResponse())
  </code></pre>
  
  <p>Any other suggestions?</p>