using (SftpClient sftp = new SftpClient(hostName, portNumber, userName, passWord))
{
sftp.Connect();
sftp.Delete(remotePath);
}
Code throws "Permission Denied" error, but i have permission to delete file. I confirmed this using WinSCP both their UI and .NET library (works fine).
Comments: ** Comment from web user: olegkap **
{
sftp.Connect();
sftp.Delete(remotePath);
}
Code throws "Permission Denied" error, but i have permission to delete file. I confirmed this using WinSCP both their UI and .NET library (works fine).
Comments: ** Comment from web user: olegkap **
Hi,
I just did a quick test and everything works fine for me.
The reason you getting "Permission Denied" because that's an error that I receiving from the server so I simply passing it back to the user.
I would check serer log files to see if you can find some usefull information there.
Unfortunately I cannot recreate this problem from the code you provided.
If you can provide me with step to create the file on remote machine so I could try it and see for my self I can then look into it.
Thanks,
Oleg