Issues connecting to FTP sites from OS/X Computers
Hello,
I have a network that is mixed with Windows and OS/X Lion, Snow Leopard machines. We access external FTP servers to download files that are needed. None of my OS/X machines are able to connect to the FTP servers while all of my Windows machines are able to without a problem. What is even more strange is that if I attemp to connect to the server using a port such as 221 instead of 21, waiting for it to fail, and then connecting on 21, it works.
Our network is using private ip addresses and the firewall is a Firebox appliance.
Any ideas?
Here is a log from terminal ftp:
ftp> open ediftp.XXXXXXXXX.com
Connected to ediftp.XXXXXXX.com.
220 Gene6 FTP Server v3.10.0 (Build 2) ready...
Name (ediftp.XXXXXXX.com:jim): USERNAME
421 Service not available, remote server has closed connection.
ftp: Login failed
ftp>
And here is the log from Filezilla that shows a connection when using the invalid port trick:
Status: Resolving address of ediftp.xxxxxxx.com
Status: Connecting to xxx.xx.xxx.xxx:21...
Status: Connection established, waiting for welcome message...
Response: 220 Gene6 FTP Server v3.10.0 (Build 2) ready...
Command: USER xxxxx
Error: Could not read from socket: ECONNRESET - Connection reset by peer
Error: Could not connect to server
Status: Waiting to retry...
Status: Resolving address of ediftp.xxxxxxx.com
Status: Connecting to xxx.xx.xxx.xxx:221...
Error: Connection attempt interrupted by user
Status: Delaying connection for 1 second due to previously failed connection attempt...
Status: Resolving address of ediftp.xxxxxxx.com
Status: Connecting to xxx.xx.xxx.xxx:21...
Status: Connection established, waiting for welcome message...
Response: 220 Gene6 FTP Server v3.10.0 (Build 2) ready...
Command: USER xxxxxx
Response: 331 Password required for xxxxxx.
Command: PASS **********
Response: 230 User xxxxxxx logged in.
Command: SYST
Response: 215 UNIX Type: L8
Command: FEAT
Response: 211-Extensions supported:
Response: AUTH TLS
Response: CCC
Response: CLNT
Response: CPSV
Response: EPRT
Response: EPSV
Response: MDTM
Response: MFCT
Response: MFMT
Response: MLST type*;size*;create;modify*;
Response: MODE Z
Response: PASV
Response: PBSZ
Response: PROT
Response: REST STREAM
Response: SIZE
Response: SSCN
Response: TVFS
Response: UTF8
Response: XCRC "filename" SP EP
Response: XMD5 "filename" SP EP
Response: XSHA1 "filename" SP EP
Response: 211 End.
Command: CLNT FileZilla
Response: 200 Noted.
Command: OPTS UTF8 ON
Response: 200 UTF8 OPTS ON
Status: Connected
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I.
Command: PASV
Response: 227 Entering Passive Mode (173,56,68,239,115,193)
Command: MLSD
Response: 150 Data connection accepted from xx.xx.xxx.xxx:37545; transfer starting.
Response: 226 Transfer ok.
Status: Directory listing successful
Jim
this is most likely a local firewall issue on the the Vista computer combined with your NAT not doing hairpinning. please see Matthew Kaufman's detailed treatment of the NAT/firewall issue at
http://forums.adobe.com/message/1064983#1064983
Similar Messages
-
Why can't I update or load new apps on my iPhone and iPad. It does not ask me for my password. I tried to sync from my laptop now I am unable to connect to any sites from internet explorer. When I try to update or load any app it tells me it is corrupt
You need to ask Apple for assistance with getting back into your old ID. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to resolve this issue through the Account Security team, fill out and submit this form.
(118441) -
Connect to FTP site with Apache commons net FTP client through Proxy
Hello,
I am trying to run this simple code to connect to FTP site through a proxy.
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
public class MyTest {
public static void main(String[] args) {
String ftpHostName = "ftp.xxx.com";
int ftpPort = 21;
String ftpUserName = "myUserName";
String ftpPassword = "myPassword";
System.setProperty("socksProxyHost" ,"10.148.0.131");
System.setProperty("socksProxyPort", "1080");
FTPClient ftpClient = new FTPClient();
try {
System.out.println("connecting");
ftpClient.connect(ftpHostName, ftpPort);
System.out.println("connected");
System.out.println("loging in");
boolean successLogin = ftpClient.login(ftpUserName, ftpPassword);
if(successLogin)
System.out.println("success login");
else
System.out.println("fail login");
catch (Exception e) {
e.printStackTrace();
finally {
try {
System.out.println("loging out");
ftpClient.logout();
System.out.println("disconecting");
ftpClient.disconnect();
catch (Exception e) {
e.printStackTrace();
I am getting the following error:
C:\temp\ftp\test>java.exe -cp ./commons-net-ftp-2.0.jar;. MyTest connecting
java.net.SocketException: Malformed reply from SOCKS server
at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:87)
at java.net.SocksSocketImpl.connectV4(SocksSocketImpl.java:265)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:437)
at java.net.Socket.connect(Socket.java:519)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:176)
at MyTest.main(MyTest.java:23)
loging out
java.lang.NullPointerException
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:471<ftp://FTP.java:471>)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534<ftp://FTP.java:534>)
at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:583<ftp://FTP.java:583>)
at org.apache.commons.net.ftp.FTP.quit(FTP.java:794<ftp://FTP.java:794>)
at org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:697)
at MyTest.main(MyTest.java:39)
I am able to do this using a different FTP client library, ftp4j-1.5.1<ftp://ftp4j-1.5.1> using the following code:
import it.sauronsoftware.ftp4j.FTPClient;
import it.sauronsoftware.ftp4j.connectors.SOCKS4Connector;
public class MyTestFtp4J {
public static void main(String[] args) {
String ftpHostName = "ftp.xxx.com";
int ftpPort = 21;
String ftpUserName = "myUserName";
String ftpPassword = "myPassword";
FTPClient ftpClient = new FTPClient();
ftpClient.setConnector(new SOCKS4Connector("10.148.0.131", 1080));
try {
System.out.println("connecting");
ftpClient.connect(ftpHostName, ftpPort);
System.out.println("connected");
System.out.println("loging in");
ftpClient.login(ftpUserName, ftpPassword);
System.out.println("success login");
catch (Exception e) {
e.printStackTrace();
finally {
try {
System.out.println("disconecting");
ftpClient.disconnect(true);
catch (Exception e) {
e.printStackTrace();
So I know the proxy settings are correct.
The java version I used to compile and run my apps is 1.6.0_06 Does anyone can help figure out what is wrong when I use the Apache commons net FTP client?
Thank you
JonIs the old AirPort Extreme base station (AEBS)
configured so that the option to distribute IP
addresses is DISABLED? If so, configure the new AEBS
to act as a bridge.
Are you suggesting I use a set-up with TWO AEBSs? Set up a bridge (not sure how) and then use the old AEBS to connect to the DSL modem and broadcast to the new Extreme which will then be the router to the other computers on the network?
Do you have any port mapping or default host enabled
on the old AEBS?
I do not understand, not do I see these options in the Base Station utitlity; perhaps they are in the FTP options--but that, I'm sorry to say, is not obvious to my inspection.
Duane, can you give me a few more basic instructions? Thanks
iMac 17 -
IWeb FTP sites from Power Mac to MackBook Pro
How do I move Powe Mac/iWeb 9 FTP sites to a MacBook Pro/iWeb 11?
You might have a MacBook Pro, but it does not have iWeb 11 - that does not exist. It has iLife 11 installed, but you still have iWeb 09, which is still part of the iLife 11 boxed set.
To move your sites, you need to move your domain.sites files and transfer these from your old Power Mac to your new Mac. These are located under User/Library/Application Support/iWeb/domain.sites. Make sure that you do in fact look under your User Library and NOT your System Library, as iWeb is not there. -
Issue connecting to HTTPS site through CURL
All,
I am having trouble requesting info from HTTPS site using CURL and PHP. I am using Solaris 10. It so happens that sometimes it works and sometimes it doesn't. I am not sure what is the cause. If it doesn't work, this is the entry recorded in the verbose log:
* About to connect() to 10.10.101.12 port 443 (#0)
* Trying 10.10.101.12... * connected
* Connected to 10.10.101.12 (10.10.101.12) port 443 (#0)
* error setting certificate verify locations, continuing anyway:
* CAfile: /etc/opt/webstack/curl/curlCA
CApath: none
* error:80089077:lib(128):func(137):reason(119)
* Closing connection #0If it works, this is the entry recorded in the verbose log:
* About to connect() to 10.10.101.12 port 443 (#0)
* Trying 10.10.101.12... * connected
* Connected to 10.10.101.12 (10.10.101.12) port 443 (#0)
* error setting certificate verify locations, continuing anyway:
* CAfile: /etc/opt/webstack/curl/curlCA
CApath: none
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: C=CA, ST=British Columnbia, L=Vancouver, O=google, OU=FDN, CN=g.googlenet.com, [email protected]
* start date: 2007-07-24 23:06:32 GMT
* expire date: 2027-09-07 23:06:32 GMT
* issuer: C=US, ST=California, L=Sunnyvale, O=Google, OU=Certificate Authority, CN=support, [email protected]
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
POST /gportal/gpmgr HTTP/1.1^MHost: 10.10.101.12^M
Accept: */*^M
Accept-Encoding: gzip,deflate^M
Content-Length: 1623^M
Content-Type: application/x-www-form-urlencoded^M
Expect: 100-continue^M
^M
< HTTP/1.1 100 Continue^M
< HTTP/1.1 200 OK^M
< Date: Wed, 28 Apr 2010 21:56:15 GMT^M
< Server: Apache^M
< Cache-Control: no-cache^M
< Pragma: no-cache^M
< Vary: Accept-Encoding^M
< Content-Encoding: gzip^M
< Content-Length: 1453^M
< Content-Type: application/json^M
< ^M
* Connection #0 to host 10.10.101.12 left intact
* Closing connection #0My CURL options are as under:
$ch = curl_init();
$devnull = fopen('/tmp/curlcookie.txt', 'w');
$fp_err = fopen('/tmp/verbose_file.txt', 'ab+');
fwrite($fp_err, date('Y-m-d H:i:s')."\n\n");
curl_setopt($ch, CURLOPT_STDERR, $devnull);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, $desturl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,120);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_VERBOSE,1);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_STDERR, $fp_err);
$ret = curl_exec($ch);Anybody has any idea, why it works sometimes but fails mostly? The error I am trying to solve is error:80089077:lib(128):func(137):reason(119)
ThanksThere seems to be some confusion here. Maybe I misunderstood your original question...
Glassfish is an Java application server.
Since you were reporting issues with PHP, I assumed you were referring to an apache httpd server.
Coolstack is a repository which contains a version of both tomcat and apache.
So I suppose that glassfish could be considered to be a replacement for the tomcat in coolstack.
However since their so different. I would have said competitor rather than replacement.
But arent we talking about apache?
But the root of the problem is actually an openssl bug.
So the issue would be to install a different copy of openssl. Then use applications that are linked against it.
Whether curl or apache or tomcat. Whatever you are seeing the problem in.
So I was more suggesting that you could try a different version of curl/openssl. It doesnt matter if you get it from coolstack or sunfreeware, or blastwave or opencsw. Or compile it yourself.
But I suggest you try patching first and hopefully you can fix the version your already using rather than replacing large amounts of software with a completely new version. -
Regarding issues connecting to EJB 2 from OSB
Hi,
I am trying to connect from OSB 11g to EJB 2 which is deployed on weblogic 7.1.
I am getting this error.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>BEA-380002: Error accessing the JNDI context for the EJB call: java.net.ConnectException: Bootstrap to failed. It is likely that the remote side declared peer gone on this JVM</faultstring>
<detail>
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380002</con:errorCode>
<con:reason>Error accessing the JNDI context for the EJB call: java.net.ConnectException:: Bootstrap to failed. It is likely that the remote side declared peer gone on this JVM</con:reason>
<con:location>
<con:node>GTX</con:node>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Can any one please help me in resolving this issue.
Thanks,Hi,
Thank you for posting in Windows Server Forum.
As per your comment, they have Remote Desktop client v5.2 and I suspect that due to this reason they can’t connect the remote session as the version if very old. We need to use latest RDP version to connect successfully. Also please check the certificate which
is used by server, please check below article for information.
Remote Desktop disconnected or can’t connect to remote computer or to Remote Desktop server (Terminal Server) that is running Windows Server 2008 R2
http://support.microsoft.com/default.aspx?scid=kb;en-US;2477176
Hope it helps!
Thanks.
Dharmesh Solanki
TechNet Community Support -
Issue connecting to Vista peer from OS X, XP and Windows 7
Hi, I've got the following problem.
Got a bunch of OS X, XP, Vista and Windows 7 machines sitting on standard NetGear LAN. The router has a static IP and is running NAT for the clients. There is a firewall to Internet (Firebrick).
There are no problems connecting between the OS X, XP, Windows 7 machines. However, you cannot connect to the Vista peers, except in some special cases.
To simplify I'm using the standard file sharing example. Calling the following method:
private function connectReceiveStreamToPeer(e:Event):void
recieveStream = new NetStream(netConnection,txtFarID.text);
recieveStream.client = this;
recieveStream.addEventListener(NetStatusEvent.NET_STATUS, receiveStreamHandler);
recieveStream.play("file");
where txtFarID.text represents a Vista peer, never results in the receive stream becoming connected to the Vista peer's sendStream...
However, there is a connection. If the Vista peer first connects its receiveStream to the sendStream of the OS X, XP or Windows 7 peer, then the OS X, XP or Windows 7 peer is thereafter able to connect its receiveStream to the sendStream of the Vista peer.
I've tested this on a couple of Vista laptops. Both are completely standard and don't have any special security software installed.
Any ideas?
Best, Dominicthis is most likely a local firewall issue on the the Vista computer combined with your NAT not doing hairpinning. please see Matthew Kaufman's detailed treatment of the NAT/firewall issue at
http://forums.adobe.com/message/1064983#1064983 -
Can't connect to ftp site using Valet Router
I can connect going directly through the cable modem
MNBobrow wrote:
I can connect going directly through the cable modem
You need to open ports for that... CLICK HERE FOR INFO
"Sometimes your knight in shining armor is just a retard in tin foil.."-ARCHANGEL_06 -
Midnight Commander - connecting an ftp site with @ in username
How would I have to write the needed parameters if the host needs to have login name in the form of [email protected]? This - [email protected]:[email protected] - did not work in MC.
Try %40 instead of @.
eg. username%[email protected]
That works in Firefox. -
Cannot connect to FTP from NetCam thru Router
I have a netcam from another vendor (AirLink SkyIPCam250) that I access thru my home network (WRT54G). I can access the live feed from outside of the network fine. Now I'm trying to auto-post pics from the netcam to my FTP site, which is hosted by GoDaddy.
After setting up the cam with my FTP info, when I try a test post, the netcam reports "can not connect to FTP server".
I've sent messages to the support departments for AirLink and GoDaddy and they indicate the settings should work. Since the netcam is going thru the WRT54G router, I'm wondering if I have to do any special port settings there (or even thru Windows XP firewall) in order to have the camera push images thru the network. When entering FTP settings on the cam, it indicates that it wants to use port 21.
If it matters, I've flashed the latest firmware for the router and camera. I can also access my FTP site from a web browser using the same name/password.
Most of this is new to me. Thanks in advance for any ideas,
- TomIf you can access ftp site from computer, then you don't need port forwarding. It is needed to host ftp site. Make sure you have set proper ftp address, and correct user name and password, on camera's setup
-
Have a 4400N wireless router, which has the current firmware & IPS signatures loaded on it. A client wants me to exchange some files with them via their FTP site. I am able to connect to the FTP site, but the upload & download or files is extremely slow. I have a Mediacom cable modem coming into my 4400N router, my laptop in this scenario is connected with a wired connection.
Funny thing, I reboot the router and then as soon as it comes up I connect to FTP site and upload/download is very fast, speed I would expect all the time. Then I disconnect from FTP, come back hours later or next day and FTP speeds are extremely slow again. Reboot router and connection is fast again. My browsing speed and e-mail download speed is solid all the time, and very quick. Appears that only FTP is affected by this router reboot.
Not sure why this is. Any ideas or explanations?I'm also having issue's but I'm unable to upload anything at all. Even a tiny .html file with about 5kb, will time out when performing this step "commmand: STOR index.html, reply: 150 Opening ASCII mode data connection." A few kb are transferred, sometimes more sometimes less but never enough for the whole file.
I opened all ports, I tried different programs, I know everything should work anyway as I can access the ftp at university or every other internet connection but at home it wont do.
Are you honestly telling me the top notch router from linksys isnt able to perform ftp uploads -
FTP site not available to download SoftPaq SP71578 (Seagate drive firmware update)
Per HP CUSTOMER ADVISORY (Document ID: c04750687) there is a firmware issue with various Seagate Kahuna hard drives. A SoftPaq has been issued (SP71578) but is currenty unavailable to download from the HP FTP site. Is there an issue with the FTP site, that specific SoftPaq or (alternately) is there some other location from which the SoftPaq might be obtained?
This is dated January 21st, so I hope it's been updated...
http://forums.seagate.com/stx/board/message?board.id=ata_drives&message.id=5692
Also, I found this:
MOST IMPORTANT - If you have a reasonable suspicion that you may have an affected drive - do not power the unit off - make fresh backups immediately. The power-on process is what triggers the failure.
Quoted from http://thedambook.com/smf/index.php?PHPSESSID=e2542559aab0b513be11ac48f7ec3a49&a ction=printpage;topic=3887.0
Sorry about the long second link. The usual shortening method didn't work. -
Error in picking files from FTP Site
Dear All,
I m using one communication channel of type FILE to pick the files from a FTP Site. Yesterday, the communication channel stopped picking the files from the FTP site. I checked the adapter in the Adapter Monitoring and it was green and was showing success messages in SXMB_MONI. I then just reactivated the complete scenario and the communication channel started picking the files again.
Is there a way to find out the trace or log in the server for the adapter or communication channel? Or how can I find out what went wrong.
Warm Regards,
N.JainHello Nishant,
That is a problem which happens frequently( atleast i faced the same ) .
The issue is realted to timeout in your FTP Adapter (Connection Issue). Just check out the mode of connection in your file adapter is it permanant or reconnect after a certain time.
What you can possibly do is contact the team which maintains the FTP server...
Regards,
Sumit -
Extract .xls file from an FTP site
Hi everyone,
Can anyone assist with this, I'm trying to extract an .xls file from a FTP site. The system I'm currently working on has no SAP application installed, we are using Microsoft SQL server as the target database and there is an FTP site which contains the .xls/.csv files and Data services as a ETL tool. The error I'm getting is 'FTP could not transfer file </DI_TEST/DATA_TO_IMPORT_1.xls> from host <www.servername.com>: <T>. Please ensure that the FTP relative path for the SAP server working directory is set correctly such that the data file is accessible to the FTP program. Also, ensure that the target path, where the transferred file is written to, is correct.'
Do I need to have SAP installed to use this functionality?
Currently to make this work, I wrote a .CMD file to do the GET ftp code and I then call this with a DI script and it works perfectly. Isn't there a way I can do this independant of the .CMD?
I'm sorry for bring this up again, I know I had a similar thread before. The reason why I closed it is that I did it using .CMD, I would prefer if I can do it with DI without using .CMD.
Thank all for your help.
Kind regards,
Edited by: gsecure on Apr 19, 2010 10:26 AM
Edited by: gsecure on Apr 21, 2010 11:08 AMHi There,
I've a similar issue. Can anyone assist with this, I'm trying to extract an .xml file from a FTP site. The system I'm currently working on has no SAP application installed, we are using Microsoft SQL server as the target database and there is an FTP site which contains the .xml files and SAP Data services as a ETL tool.
Thank you
Mohan -
Transfer a file from App Server to a FTP site.
Hi, Abapers.
I need your help. Probably, this topic has already been posted in a similar way, but we need an answer to solve our problem.
We have to sent a PDF file from a directory of our app server (AIX) to a FTP directory... which would the FM sequence we should use to goal it?
Best Regards.Hi Santiago,
create fm to send file from APP server to FTP site.
if you want to Post file from desktop to Appl use Transaction - CG3Y
if you want to Post file from Appl to Desktop use Transaction - CG3Z
copy the code below....
* Author: Prabhudas Date: 02/21/2006 *
* Name: Z_FTP_FILE_TO_SERVER *
* Title: FTP File on R/3 Application Server to External Server *
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(DEST_HOST) TYPE C
*" REFERENCE(DEST_USER) TYPE C
*" REFERENCE(DEST_PASSWORD) TYPE C
*" REFERENCE(DEST_PATH) TYPE C
*" REFERENCE(SOURCE_PATH) TYPE C
*" REFERENCE(FILE) TYPE C
*" REFERENCE(BINARY) TYPE CHAR1 OPTIONAL
*" REFERENCE(REMOVE_FILE) TYPE CHAR1 OPTIONAL
*" TABLES
*" FTP_SESSION STRUCTURE ZMSG_TEXT OPTIONAL
*" EXCEPTIONS
*" CANNOT_CONNECT
*" SOURCE_PATH_UNKNOWN
*" DEST_PATH_UNKNOWN
*" TRANSFER_FAILED
*" COMMAND_FAILED
DATA: w_password TYPE zftppassword,
w_length TYPE i,
w_key TYPE i VALUE 26101957,
w_handle TYPE i,
w_command(500) TYPE c.
REFRESH ftp_session.
* Scramble password (new Unicode-compliant routine)
w_length = STRLEN( dest_password ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = dest_password
sourcelen = w_length
key = w_key
IMPORTING
destination = w_password.
* Connect to FTP destination (DEST_HOST)
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = dest_user
password = w_password
host = dest_host
rfc_destination = 'SAPFTPA'
IMPORTING
handle = w_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
RAISING cannot_connect.
ENDIF.
* Optionally, specify binary file transfer
IF binary = 'X'.
w_command = 'bin'.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING command_failed.
ENDIF.
ENDIF.
* Navigate to source directory
CONCATENATE 'lcd' source_path INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING source_path_unknown.
ENDIF.
* Navigate to destination directory
CONCATENATE 'cd' dest_path INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING dest_path_unknown.
ENDIF.
* Transfer file
CONCATENATE 'put' file INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING transfer_failed.
ENDIF.
* Disconnect from destination host
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = w_handle.
* Optionally, remove file from source directory
IF remove_file = 'X'.
CONCATENATE source_path '/' file INTO w_command.
CONCATENATE 'rm' w_command INTO w_command SEPARATED BY space.
OPEN DATASET '/dev/null' FOR OUTPUT FILTER w_command.
CLOSE DATASET '/dev/null'.
ENDIF.
Regards,
Prabhudas
Maybe you are looking for
-
Editable ALV, how to capture changed data
Hi All, I have created an editable ALV. User can make some changes in the displayed record and press "Submit" button (custom button on application toolbar), the program should validate the data and write the file on application server if validations
-
I've just purchased the photographer's package, but the download button for Lightroom doesn't show in my app list. How come? I've checked everything and my computer system should be able to run it perfectly.
-
How do I Get pictures from my canon camera to upload into iphoto
I plug my canon into usb and it looks like pictures are uploading but then only 5 are in iphoto and the rest it say are not readable.
-
I am not able to download neospeech from teh below link for Captivate 7: http://www.adobe.com/go/captivate_voices_installer_win64 Is there any other location where i can download this?
-
Spring error convering 9i to 10g
Hi, we are porting a legacy sales package from App Server 9i to 10g (10.1.3.1.0). It uses Andromda, Hibernate and Spring. We have almost got it working in OC4J 10.1.3.1, but have got the following error. We encountered similar problems when trying to