Topic "Upload File to the root directory doesn't work"

Author Message
vandyke

Guest


Hello,

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.

I tried:
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 Sad

The Error is:
WinSCP.SessionRemoteException: Cannot create remote file '/test.xml'.
Permission denied.
Error code: 3
Error message from server: Permission denied



I don't know how to remove the leading '/'.
Advertisements
vandyke

Guest


ok, after do some more investigation I found out, that I can't upload a file to the root duo permission restrictions on the server. I was just confused, because I was able to create a new file with filezilla in the root directory. I inform the server administrator.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26572
Location: Prague, Czechia
vandyke wrote:
ok, after do some more investigation I found out, that I can't upload a file to the root duo permission restrictions on the server. I was just confused, because I was able to create a new file with filezilla in the root directory. I inform the server administrator.

If you can create file in the root with FileZilla, you must be able to create it with WinSCP (other things equal).

Show us a complete verbose session files for both FileZilla and WinSCP.
vandyke

Guest


Sorry, the administrator changed something. Now I am not able to create a file in the root directory anymore.
So, all is working fine now.

But I want to thank you for your ecellent program and the dotnet library Wink
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License