Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP and directory .

 
Veli Körkkö
Trusted Contributor

SFTP and directory .

VMS_HP_TCPIP_SERVICES$ sftp username@experian..
password given


sftp> ls
fcr_parse_raw: . (src): no such file (server msg: 'File not found')
sftp> ls /
fcr_parse_raw: / (src): no such file (server msg: 'File not found')
sftp> cd /
CD failed.
/
sftp> ls
fcr_parse_raw: . (src): no such file (server msg: 'File not found')

So immediately after login various commands like ls, put etc fail like above

Using some other client (Putty sftp) I get to know there are Upload and Download diretories

Attemp to change directory to those fails also
fails like

sftp> cd Upload
CD failed.
/
sftp> cd Download
CD failed.
/


But if I use "absolute path" like cd /Upload it will succeed and then a put is possible like

sftp> cd /Upload
/Upload
sftp> ls
.
sftp> cd ..
/
sftp> pwd
/
sftp> ls
.
Download
Upload
sftp> quit


To me it seems that maybe the remote host does not implemement directory . somehow right after login

sftp> debug 5
sftp> ls
SshFileCopy/SSHFILECOPY.C:685: Allocating SshFileCopyFileListItem structure...
SshFCGlob/SSHFC_GLOB.C:803: Adding file . to file list without globbing...
SshFCGlob/SSHFC_GLOB.C:649: File list is at its end.
SshFCGlob/SSHFC_GLOB.C:980: Destroying global data...
SshFCRecurse/SSHFC_RECURSE.C:366: Source connection OK.
SshFCRecurse/SSHFC_RECURSE.C:398: File is "raw", and it needs to be parsed.
SshFCRecurse/SSHFC_RECURSE.C:331: Received error `File not found' (2).
Sftp2/SFTP2.C:3289: Error while recursing
fcr_parse_raw: . (src): no such file (server msg: 'File not found')
SshFCRecurse/SSHFC_RECURSE.C:737: No more files in this list.
Sftp2/SFTP2.C:3276: Recursing ready
Sftp2/SFTP2.C:3393: Asking the pager to finish.
Sftp2/SFTP2.C:3359: Pager Finished

If I change directory to /Upload and then back using cd .. then

sftp> ls
SshFileCopy/SSHFILECOPY.C:685: Allocating SshFileCopyFileListItem structure...
SshFCGlob/SSHFC_GLOB.C:803: Adding file /. to file list without globbing...
SshFCGlob/SSHFC_GLOB.C:649: File list is at its end.
SshFCGlob/SSHFC_GLOB.C:980: Destroying global data...
SshFCRecurse/SSHFC_RECURSE.C:366: Source connection OK.
SshFCRecurse/SSHFC_RECURSE.C:398: File is "raw", and it needs to be parsed.
SshFCRecurse/SSHFC_RECURSE.C:517: File . is a directory. Starting recursion...
SshFCRecurse/SSHFC_RECURSE.C:954: Opening directory /....
.
SshFCRecurse/SSHFC_RECURSE.C:1208: SshFileRecurseFunc returned FALSE, so we don't want to traverse this directory.
SshFCRecurse/SSHFC_RECURSE.C:1208: SshFileRecurseFunc returned FALSE, so we don't want to traverse this directory.
Download
Upload
SshFCRecurse/SSHFC_RECURSE.C:331: Received error `eof' (1).
SshFCRecurse/SSHFC_RECURSE.C:728: Current location list is at it's end. Moving to next...
SshFCRecurse/SSHFC_RECURSE.C:737: No more files in this list.
Sftp2/SFTP2.C:3276: Recursing ready
Sftp2/SFTP2.C:3393: Asking the pager to finish.
Sftp2/SFTP2.C:3359: Pager Finished


Above tests were performed using OpenVMS Alpha V8.2 and HP TCPIP SERVICES V5.5 ECO 3.

Similar behaviour has been to large extent using OpenVMS Alpha V8.3 TCPIP v5.6 ECO 2 and ECO 4 and most notably on the original machine, OpenVMS V8.3 Integrity, TCPIP V5.6 ECO 3.

any comments whether this problem would be a problem on the VMS SFTP client side or rather at the remote end (operating system etc details unknown)


_veli
6 REPLIES 6
Wim Van den Wyngaert
Honored Contributor

Re: SFTP and directory .

What is the login directory on the remote node ? Do you have access to it ?

It should be "/" because you expect to find "Upload" in it. But I guess you don't have access to / but only to /Upload.

Wim
Wim
Veli Körkkö
Trusted Contributor

Re: SFTP and directory .

Yes I do have access because I can see the contents properly with say PUTTY SFTP utility BUT NOT WITH OPENVMS SFTP. So this is some kind of strange combatability problem. My question do we hesitate to guess the problem is more with the other (remote) end rather than OpenVMS sftp client?

_veli
Steven Schweda
Honored Contributor

Re: SFTP and directory .

> [...] at the remote end (operating system
> etc details unknown)

So, knowing nothing about the software on the
remote system, we have no real knowledge of
how it interprets a directory spec like "/".
Or do we?

> [...] I can see the contents properly with
> say PUTTY SFTP utility [...]

So, the next question might be what does
PuTTY do, about which I also know nothing.

> sftp> debug 5
> [...]

Where's the corresponding output from PuTTY?

What I do know is that dealing with different
plain FTP servers is more complicated than
one might think. I have no reason to believe
that dealing with different SFTP servers is
any less complicated.


> Current location list is at it's end. Moving to next...

In any case, I wouldn't trust any programmer
who can't be trusted with an apostrophe.
Richard Whalen
Honored Contributor

Re: SFTP and directory .

the SSH File Transfer Protocol specification defines file specification syntax so that there is no question on how the other side SHOULD treat "/". But, I have seen implementations of SFTP that restricted the STAT operation and therefore made it difficult for other implementations to inter-operate.
Wim Van den Wyngaert
Honored Contributor

Re: SFTP and directory .

I'm missing the output of pwd while it goes wrrong. Then we can see where sftp thiks we are. May be a syntax is in it that is incorrect ?

version could tell something too.

Wim
Wim
Veli Körkkö
Trusted Contributor

Re: SFTP and directory .

Right after initial login pwd tells we are at / but attempt to do ls or pretty much whateever (relative current location as of / as pwd says or . like it looks be also)
fails.

CD to absolute path succeeds as shown.

I have no interactive access to remote end so it is pretty much impossible to tell anything about it.

psftp aka putty sftp version used was 0.60 but with this client no problem at all.

The problem occurs when using HP TCPIP openVMS SFTP client. Versions used so far have from V5.5 ECO 3, V5.6 ECO 2, 3 and 4.

To me it looks like client thinks current directory is "." and the remote end has trouble understanding this . directory right after initial login.


sftp> pwd
/
sftp> ls
fcr_parse_raw: . (src): no such file (server msg: 'File not found')
sftp> cd //
/
sftp> ls
.
Download
Upload


Anyway I dont have "problem" any more since we have invented a workaround already and my customer can now proceed.

I just though this was a strange behaviour

_veli