Absolute File Path Usage

Advertisement

Zild
Joined:
Posts:
4

Absolute File Path Usage

Hi all,

I started trying to use the .NET assembly today (V5.1.7.0) for FTP protocol but am having difficulty with file paths on the target server.

The problem is any connection to the server (using either the WinSCP exe or the .NET assembly within my own software) seems to be routed instantly to a subdirectory (e.g. home/zild), but the files need to be uploaded to a different directory (e.g. home/test). If I try to set the remote path to home/test/ (the absolute path) it actually uses a relative path (e.g. home/zild/home/test). I thought the .NET assembly only used absolute paths, so this is a surprise. Unfortunately I cannot find a way to set the path to the desired location (home/test).

Can somebody please explain what I am doing wrong here? I have tried searching the documentation and forums already but remain stuck.

Reply with quote

Advertisement

iceporing
Joined:
Posts:
4

If I try to set the remote path to home/test/ (the absolute path) it actually uses a relative path (e.g. home/zild/home/test).

Try using /home/test/

Reply with quote

Zild
Joined:
Posts:
4

Thanks for the suggestion, but it gives the same result; it creates "/home/zild/home/test" then uploads to there. :(

EDIT: Sorry, my mistake. It turns out the user account my software is using has limited permissions on the target server, preventing it from creating files in the required directory. When trying to create files within an accessible directory everything works as expected. :oops:

EDIT2: Correction, no it does not. I can still only create files in "/home/zild" and its subdirectories, not "/home/test" (for which I now supposedly have permissions for). Either with or without the leading "/", the resulting directory location is the same.

Any suggestions at all?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,271
Location:
Prague, Czechia

On SO, I've asked you to share your code.
Can you please do this (here or there) and even better also attach a log file?
_________________
Martin Prikryl

Reply with quote

Zild
Joined:
Posts:
4

Thanks. I updated my post on SO to include my code. Will add logs if I get them working (not played with them yet, don't even know where to start!)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,271
Location:
Prague, Czechia

Zild wrote:

Thanks. I updated my post on SO to include my code. Will add logs if I get them working (not played with them yet, don't even know where to start!)
I've answered on SO.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum