Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: The server response "Permission denied", how to fix it?

Internet Explorer does not support SFTP. It supports FTPS (FTP over TLS/SSL). What is a completely different protocol.
You are possible using a different protocol in WinSCP than in IE.
Guest

Re: The server response "Permission denied", how to fix it?

Hello

I am getting Permission Denied error, but when I upload same file to same directory on SFTP using Internet explorer, then it works successfully.

Is there any setting i am missing?

Thanks
martin

Re: The server response "Permission denied", how to fix it?

Are you able to upload the files to that folder using any (even GUI) SFTP client?
Diandian

The server response "Permission denied", how to fix it?

Hello,
I use these code to upload the file:
SessionOptions sessionOptions = new SessionOptions

{
   Protocol = Protocol.Sftp,
   HostName = "devserver",
   UserName = "ftpClient",
   Password = "123456",
   SshHostKeyFingerprint = "ssh-rsa 1024 63:3d:d2:6e:19:f5:2b:e4:be:02:3b:5b:ab:d3:75:9a"
};

using (Session session = new Session())
{
   session.DisableVersionCheck = true;
   session.SessionLogPath = @"d:\winscpLog.txt";
   session.Open(sessionOptions);

   TransferOptions transferOptions = new TransferOptions();
   transferOptions.TransferMode = TransferMode.Binary;
   TransferOperationResult transferResult;
   transferResult = session.PutFiles(@"D:\Cache\DCCV2\*", "/home/ftpClient/", false, transferOptions);

   transferResult.Check();
   foreach (TransferEventArgs transfer in transferResult.Transfers)
   {
      Console.WriteLine("Upload of {0} succeeded", transfer.FileName);
   }
}


But response error: can not create folder '/home/ftpClinet/xxx/', error code:3, Permission denied.
The server SSHd set SFTP home path is "E:\FTP".

My question is:
How to write the remotePath?
How to fix this permission denied?

Thanks.