wasftp:cd returning error code 4

I am using the WaSFTP package to connect to client SFTP server.
I can login fine but when I use the wasftp:cd command to change directory it does not change directory and returns a status of “4”.
When I do a wasftp:pwd it shows I am in my home directory.
Does anyone have any idea what might be going on?

I need to move to the “Test” directory and I have tried “Test” and “/Test” and neither seem to work.

Any ideas would be appreciated.

I think I figured it out. It seems to want the path to be “TEST” even though when I do a dir on the server itself it appears as “Test”

My problem now is it will cd into “TEST” but it won’t actually put the file there.
If I don’t do the CD, it puts the file fine.
If I do a PUT with the full path it still won’t put it there.
It will only PUT the file in the home directory.
I also don’t get any errors when it tries to put them there.

BTW, I’ve tried to use wasftp:cd to move to the directory and put the file.
I’ve also tried to put the full path in the wasftp:put command and neither will put the file in place.

so I am able to CD one level to the /TEST directory.
If I go only one level I can PUT a file there.
if I CD two levels /TEST/IN, the CD is successful but the PUT does not put the file there.
I also do not receive any error. It is as if WM thinks the file has been put there but it doesn’t show up. I can manually drop a file there with no issue.

Can you also check the IS logs and see if any errors?

Can you have 2 CD calls and try put a file if that works for you (although with one CD should work)?

HTH,
RMG

Hi RMG, I have tried 2 CD calls(or 1 CD call) and it doesn’t matter. When I do a PWD and LS, I am in the right directory the PUT just won’t put the file there. I’ve even tried putting the full path in the PUT statement and it still will not put the file there. I get a null status (which is good).
If I mis-type any part of the directory in the PUT statement I get an error so it appears to be functioning correctly. I see no errors in the IS.
I have even manually put a file over there to make sure they weren’t auto-picking it up quickly and those files stay out there so it appears the PUT is not working correctly.

Oh that sounds a weird behavior…what is the IS version?

Can you please contact SAG support may be they can point you in the right direction with any fix or other troubleshooting options?

HTH,
RMG

We are on version 8.0.
I thought that the waSFTP package was unsupported by SAG?

Does interacting with the server using something other than IS and waSFTP behave the same way? Or are these symptoms specific to IS/waSFTP?

Hi Reamon, it is specific to the IS/waSFTP. If I use WinSCP it works just fine.

BTW, I have opened a ticket with SAG support to see what they might say.

Then I suspect may be the issue with the waSFTP CD or PUT service functionality with double folder path self?

SAG support responded that they do not support this package.

make sense but issue not resolved right?

Chris,

Where did you get the WaSFTP package from SAG/Empower?

Can you please share the info:

TIA,
RMG

Hi RMG, we are trying to figure out where the package came from.
The guy that downloaded it said he thinks he either got it here or the empower site but I have been unable to find it on either site. It has been well over a year since he got it so I expect the sites have changed.

BTW, I figured out my issue. The partner had a very hard to see space in their directory path.
it was /TEST/To_ Client instead of /TEST/To_Client. After removing the space it worked fine.

Hi all

did you check the about page.
if there is jsch-xxxxx.jar in WS-Stack/lib.
upload jsch-0.1.37.jar that exists in WaSFTP/code/jars to $IS_HOME/lib/jars manually
then restart IS.

What does this fixes?? will the return codes work as expected?

HTH,
RMG

Hi RMG

this is not the fix, jsch-0.1.37.jar is located in WaSFTP package itself.
for your understanding, i would like to share my exprience
i have 7.1.3 & 8.2.1 IS.
when i tested it on 7.1.3, everything works fine.
but on 8.2.1 wasftp:cd does not work, it coudn’t change directory.

1st try, i thought jsch-0.1.37.jar has problem in JAVA6.
so, replaced it to the newer version(0.1.49).

  • does not work and i couldn’t find 0.1.49.jar in about page.
  • but i found another version(0.1.31) is loaded on IS.

2nd try, upload 0.1.37.jar to IS_HOME/lib/jar to precede 0.1.31

  • it works.

HTH,
namhoon.kim