I have problems with uploading a single file to the root of an sftp server. There is no problem to upload the file to an existing directory, but not to the root.
DnSession.PutFiles(DocFileName, FtpRemotePath, FALSE, DnTransferOptions);
where FtpRemotPath is "/"
I also tried: "./", "", and session.HomePath + "/" like mentioned here: https://stackoverflow.com/questions/26971992/winscp-net-assembly-how-to-upload-files-to-home
None of those RemotePath Values does work :(
The Error is:
WinSCP.SessionRemoteException: Cannot create remote file '/test.xml'.
Error code: 3
Error message from server: Permission denied
I don't know how to remove the leading '/'.