Able to getfile, but unable to put file? (wodSFTP / wodSFTP.NET / wodSFTPdll)
Hi Tech Support,
I am using WodsFTP.ocx to put/get files from a sFTP file server. Works like a charm until I realised that there is a need to perform FTP file transfer too.
I tried using ftpDLX to perform put/get files from sFTP server. works fine as before(wodsFTP.ocx). But when perform put/get files from a FTP site, the connection established without problems, I can do a getfile too.
But when I tried to use putfile, It keeps throwing me error code 40501/40550. The FTP site is a AS/400 machine. Any leads I can cling onto?
Thanks for your time!
Regards,
Wee Ping
Re: Able to getfile, but unable to put file?
Wee,
this is server's error 501/550, usually means 'no such file' or 'no permissions'. Do you specify full path to put file? Do you have enough permissions to upload the file?
Re: Able to getfile, but unable to put file?
Wee,
this is server's error 501/550, usually means 'no such file' or 'no permissions'. Do you specify full path to put file? Do you have enough permissions to upload the file?
No issue with access rights. I manually FTPed into the FTP server to get/put files without probs.
As the FTP server is AS/400 machine, it is using libraries/member instead of directories/file name. Could this require me to change the way I name my path even though it(the path) worked for sFTP?
Re: Able to getfile, but unable to put file?
Yes, this is very possible. What is your current path now? How do you plan to change it?
Since FTP and SFTP server are completely different, this could be the reason for different path types.
Re: Able to getfile, but unable to put file?
Yes, this is very possible. What is your current path now? How do you plan to change it?
Since FTP and SFTP server are completely different, this could be the reason for different path types.
I tried:
ActiveXCtl6.putfile c: emp est , /dest/out (works for sFTP)
ActiveXCtl6.putfile c: emp est , dest/out
ActiveXCtl6.putfile c: emp est , /dest/out/test
ActiveXCtl6.putfile c: emp est , /dest/out/test(test)
All above failed for FTP. Any other possible things I missed?
Re: Able to getfile, but unable to put file?
Wee,
no, looks ok.
Ok, let's try the other way. Can you call
ListDir( / )
and then see if in result you find your path. If you do (for example 'test'), then try
ListDir( /test )
etc.. Do that to make sure all paths you refer to exist and you can look their contents.
Can you try that?
Re: Able to getfile, but unable to put file?
Wee,
no, looks ok.
Ok, let's try the other way. Can you call
ListDir( / )
and then see if in result you find your path. If you do (for example 'test'), then try
ListDir( /test )
etc.. Do that to make sure all paths you refer to exist and you can look their contents.
Can you try that?
Hi Support,
I have tried to do this:
[code]ActiveXCtl6.ListDir ( /XXX )[/code]
returns 501 error.
I manually FTPed in and set working directory to XXX, perform a ls on /XXX. lists all files without failing.
any idea? Its frustrating that getfile() works, with the same path(only reversed in order). anything else I can work with?
Thanks for your assistance thus far.
Re: Able to getfile, but unable to put file?
Wee,
did you try any other FTP client (app), does it work? Usually, when something like this happens, I fire up FTP Voyager and try to see how it behaves with it, and then just duplicate commands it sends. It's much easier since it's visual that way.
Kreso
Re: Able to getfile, but unable to put file?
Wee,
did you try any other FTP client (app), does it work? Usually, when something like this happens, I fire up FTP Voyager and try to see how it behaves with it, and then just duplicate commands it sends. It's much easier since it's visual that way.
Kreso
Hi Kreso,
Tried voyager. Didn't find any leads from there.
When I tried this to validate mt remote directory,
ActiveXCtl6.CheckDir ActiveXCtl6.RemotePath
Returns ErrorCode = 0 in the done event. Which implies the remote drive is valid.
Does this means my local drive is incorrect? I made sure I had c: emp in my local drive. With the file named test
Is there anyway I can validate my local path? with checkDir perhaps?
Please advise. Many Thanks!
Regards,
Wee Ping, Tan
Re: Able to getfile, but unable to put file?
Wee,
unfortunatelly, I don't think I can give you any hints without connecting there and trying to see directory structure myself. CheckDir sends 'CWD' command to the server, and if it succeeds, then CheckDir succeeds too.
But why PutFile fails - I really have no idea.
Is there any possible way I could connect there?
Kreso
Re: Able to getfile, but unable to put file?
Wee,
unfortunatelly, I don't think I can give you any hints without connecting there and trying to see directory structure myself. CheckDir sends 'CWD' command to the server, and if it succeeds, then CheckDir succeeds too.
But why PutFile fails - I really have no idea.
Is there any possible way I could connect there?
Kreso
Hi Kreso,
Unfortunately, I do not have the access/rights to create a test account for you to access the FTP Server.
I copied the same code to run in another access 97 application.
This time the ErrorCode=40431
Any idea?
Thanks and regards,
Wee Ping, Tan
Re: Able to getfile, but unable to put file?
What is 40431? Can you get ErrorText inside Done event?
Kreso
Re: Able to getfile, but unable to put file?
What is 40431? Can you get ErrorText inside Done event?
Kreso
Hi Kreso,
I realised that when I issue this command:
ActiveXCtl0.Connect 10.x.x.x , 21 , FTP
The code step into the connected event: Private Sub ActiveXCtl0_Connected(ByVal ErrorCode As Long, ByVal ErrorText As String)
The ErrorCode value = 0 and ErrorText =
Which I assume is a good connection.
Immediately, It goes into the done event: Private Sub ActiveXCtl0_Done(ByVal ErrorCode As Long, ByVal ErrorText As String)
This time, the ErrorCode = 40501 and ErrorText =
Does this means the connection is not good as the errorCode is not = 0
And why does it goes into Done event upon connected as there wasn't other commands being issued. What was being done?
Thanks for advising
Re: Able to getfile, but unable to put file?
Wee,
are you using OCX (GUI version)? Immediately after connecting, OCX sends PWD command to retrieve current directory listing, perhaps this is where it fails?
Can you use FTPReply event, and put code like this inside
Debug.Print Command & & ReplyText
and paste it here? It should contain complete conversation with the server and tell us what happened.
Kreso
Re: Able to getfile, but unable to put file?
Wee,
are you using OCX (GUI version)? Immediately after connecting, OCX sends PWD command to retrieve current directory listing, perhaps this is where it fails?
Can you use FTPReply event, and put code like this inside
Debug.Print Command & & ReplyText
and paste it here? It should contain complete conversation with the server and tell us what happened.
Kreso
Hi Kreso,
I am using the OCX(GUI) version.
220-QTCP at ATLANTIS.
220 Connection will close if idle more than 5 minutes.
USER xxx 331 Enter password.
PASS xxxx 230 XXX logged on.
FEAT 211-Feature listing follows:
AUTH TLS
PBSZ
PROT
211 End of feature listing.
PWD 257 QGPL is current library.
TYPE A 200 Representation type is ASCII nonprint.
PASV 227 Entering Passive Mode (10,223,156,90,111,40).
LIST -al QGPL 501 Character (-) not allowed in object name.
I guess the error will be: [size=6]LIST -al QGPL 501 Character (-) not allowed in object name.
[/size]?
Where do you think the - comes from?
thanks,
wee ping
Re: Able to getfile, but unable to put file?
Wee,
from ListParams property
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLXLib~wodFtpDLX~ListParams.html
set Ftp1.ListParams = and try again.
Kreso
Re: Able to getfile, but unable to put file?
Wee,
from ListParams property
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLXLib~wodFtpDLX~ListParams.html
set Ftp1.ListParams = and try again.
Kreso
Hi Kreso,
as advised, the error was gone after I set listparam =
however the putfile operation still fails.
220-QTCP at ATLANTIS.
220 Connection will close if idle more than 5 minutes.
USER XXX 331 Enter password.
PASS XXXX 230 XXX logged on.
FEAT 211-Feature listing follows:
AUTH TLS
PBSZ
PROT
211 End of feature listing.
PWD 257 QGPL is current library.
TYPE A 200 Representation type is ASCII nonprint.
PASV 227 Entering Passive Mode (10,223,156,90,190,71).
LIST QGPL 125 List started.
LIST QGPL 250 List completed.
CWD QGPL 250 QGPL is current library.
TYPE I 200 Representation type is binary IMAGE.
PASV 227 Entering Passive Mode (10,223,156,90,240,94).
STOR QGPL 550 Not authorized to access library QGPL.
[color=#abcdef]STOR QGPL 550 Not authorized to access library QGPL.
[/color]
Is this due to access rights? But I am able to manually FTP get and put file via command prompt. with the same user ID and password.
?
Re: Able to getfile, but unable to put file?
Wee,
ok, can you get same log from client that worked? Let's see what it did differently.
Kreso