Scripted logon fails to change Host directory

Advertisement

markr007
Joined:
Posts:
2
Location:
McMinnville Oregon

Scripted logon fails to change Host directory

Hi - I am trying to get what I thought would be a simple scripted file upload to a server I don't have any control over - the only thing I know is that I am to use SSH2. Even when I log on manually to the WinSCP session, double clicking on the host directory off the root that I have access to gives me an error that it can't find d:\sftp\DirectoryName.

However, I can drag a file from the local root and drop it on top of the host directory and the transfer works. So whether running the script shown below or manually navigating to the site, I get an error trying to change the host directory for an unknown reason.

The script I ran is:
open "County_SFTP"
cd /DirectoryName
put "Client Report.pdf"
exit

When I do the same site access using Filezilla set to SSH2 protocol, I can pop in and out of the remote directory with no issues on the same site, which tells me it's possible to do. I'm not 100 percent sure that all of the more granular settings in WinSCP are right. However, on my locally run SFTP site even with WinSCP I can easily get into and out of the host directory. So not sure why this destination server is being fussy or exactly what the real story is.

In case this helps, here's the section of the log that shows the error.... Any clues would be greatly appreciated!

. 2010-04-09 12:17:03.211 Startup conversation with host finished.
. 2010-04-09 12:17:03.211 Changing directory to "/DirectoryName".
. 2010-04-09 12:17:03.211 Getting real path for '/DirectoryName'
> 2010-04-09 12:17:03.211 Type: SSH_FXP_REALPATH, Size: 17, Number: 528
< 2010-04-09 12:17:03.289 Type: SSH_FXP_NAME, Size: 39, Number: 528
. 2010-04-09 12:17:03.289 Real path is '/DirectoryName'
. 2010-04-09 12:17:03.289 Trying to open directory "/DirectoryName".
> 2010-04-09 12:17:03.289 Type: SSH_FXP_LSTAT, Size: 17, Number: 775
< 2010-04-09 12:17:03.383 Type: SSH_FXP_STATUS, Size: 76, Number: 775
< 2010-04-09 12:17:03.383 Status code: 2, Message: 775, Server: syserr: No such file or directory, file: D:\SFTP\DirectoryName\, Language: en
* 2010-04-09 12:17:03.383 (ECommand) Error changing directory to '/DirectoryName'.
* 2010-04-09 12:17:03.383 No such file or directory.
* 2010-04-09 12:17:03.383 Error code: 2
* 2010-04-09 12:17:03.383 Error message from server (en): syserr: No such file or directory, file: D:\SFTP\DirectoryName\

Reply with quote

Advertisement

markr007
Joined:
Posts:
2
Location:
McMinnville Oregon

Hi - thanks very much for your willingness to take a quick look at this situation. it seems logically that I must not have the exact right configuration in WinSCP but I can't see what may need to be changed to ensure that it is acting in "pure SSH2" mode.

Here is the Filezilla log that was generated by connecting to the remote SFTP site that the transfer with WinSCP needs to go to, and shows getting in and out of the specific host directory that I can't seem to reach with my WinSCP script. Any advice would be appreciated.... Mark

10:41:56 Status: Connecting to 159.121.94.xyz...
10:41:57 Response: fzSftp started
10:41:57 Command: open "sitename_ftp@159.121.94.xyz" 22
10:42:03 Command: Pass: **********
10:42:04 Status: Connected to 159.121.94.xzz
10:42:04 Status: Retrieving directory listing...
10:42:04 Command: pwd
10:42:04 Response: Current directory is: "/"
10:42:04 Command: ls
10:42:04 Status: Listing directory /
10:42:04 Status: Directory listing successful
10:42:17 Status: Retrieving directory listing...
10:42:17 Command: cd "DirectoryName"
10:42:17 Response: New directory is: "/DirectoryName/"
10:42:17 Command: ls
10:42:18 Status: Listing directory /DirectoryName
10:42:18 Status: Calculating timezone offset of server...
10:42:18 Command: mtime "County Client Report.pdf.filepart"
10:42:18 Response: 1270839582
10:42:18 Status: Timezone offsets: Server: -42 seconds. Local: -25200 seconds. Difference: -25158 seconds.
10:42:18 Status: Directory listing successful
10:42:28 Status: Retrieving directory listing...
10:42:28 Command: cd "/"
10:42:28 Response: New directory is: "/"
10:42:28 Status: Directory listing successful

Reply with quote

martin
Site Admin
martin avatar

Re: Scripted logon fails to change Host directory

I have no clue. Can you obtain any log from the server side?

Reply with quote

Advertisement

You can post new topics in this forum