Using chmod from FTP
I'm 'installing' files using FTP.
Some executable files require the 'execute' bit to be set.
How can I invode chmod from Sun Solaris FTP - I get the message "invalid command" now.
Hi
Solaris 2.6 and onwards provide a /etc/default/ftpd file that can be
used to set the umask value for the ftp session. But unfortunately,
you still can not set the execute permissions directly due to security
reasons. i.e even if you have the "source" file with rwxrwxrwx
permissions and specify a UMASK value of 000 in /etc/default/ftpd,
you will only get the remote file permissions as rw-rw-rw-.
To accomplish the "execute" bit setting, you will have to use the
public domain software wu-ftpd which is available for download from
http://www.sunfreeware.com
HTH
Shridhar
Similar Messages
-
How to get file from FTP Server using File Control
Hi,
Any one did getting file from FTP Server?
Please let me know any one help me.
I would need to get file from FTP Server.
Thanks,
MadhuYes I have done that. But In FTP Server I cannt read file, because no previliges. Only I need to copy file from FTP Server to local server then only I can read that file.
I tried all options using FileConrol(getFiles(),read()).
getFiles() - It wont copy the file, it give information about file.
read() - I dont have previliges to read the file.
Please tell me any other procedure would be there for getting file from FTPServer.
Thanks,
Madhu -
Process TIFF file from FTP server using File/FTP adapter
Hi,
I have a requirement to process a scanned document TIFF file from a directory on an FTP server using the File/FTP adapter and process through XI into a Web Service via a receiver SOAP adapter.
My question is can the file/FTP adapter be used to process the TIFF file into XI from an FTP server ? Also, what settings need to be made on the file adapter to allow this file to be processed into XI ?
Thanks in advance
Colinhi colin,
TIFF is type of image file, it can be converted to binary using java mapping
refer this pdf
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
regards
Ramesh P -
Unzip files from FTP using ABAP
Hi All,
I have the a requirement to unzip certain files from ftp and transfer the extracted files to another directory in ftp.
Searched (Re: Unzip file;) in SDN but didnt find the perfect solution
Appreciate the help.
Regards
SivaYou can use IndexOf function
see this example
http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to download a directory into local machine from FTP using java
Hi,
I want to download a directory from FTP. How can i achieve this.
Regards,
AhamadAchieve what? How about thinking about what you really have to do in detail? That way you might find out how it'll work and what to implement.
By the way, there are many Java FTP libraries (e.g. NetComponents.jar) available. Google will find them, and you can use them to do at least the accessing part of your program. -
Zip files from FTP server using BODS 4.1
HI Friends,
My requirement: Move zip files from FTP server to Target server using Data services.
The zip files( variable) are loaded daily into a directory in an FTP server, I need to establish a connection to the FTP server and get the zip files into BODS Environment. Can anyone please list out the steps to get the connection from FTP to BODS?
My Environment : BODS 4.1 SP1
Thanks and Regards
AnilHi Anil,
We have done similar kind of requirement
1. Connect FTP server
2. call Exec command
3. write simple script move file to whatever your location
Please let me know
FYI.. Let me check if get same ATL for you.
Regards,
Manoj. -
Problem using CLIENT_HOST to FTP files from forms 10g
Hi,
I'm trying to use forms 10g ODS & webutil on NT to allow a user to select a file on their machine or the network and transfer the file to a DB server. I want to transfer the file to the file system on the server NOT to a BLOB column on a table. I've used webutil (client_get_file_name) to display the dialog box and allow the user to select a file. This works fine. However, when I try to use CLIENT_HOST to FTP the selected
to the remote server it fails. I'm issuing the following
command from within forms:
CLIENT_HOST('CMD /C ftp -n -s:C:\test_ftp.txt');
Something tries to kick off and a grey area the size of a dos window flashes on to the screen for a couple of seconds but the FTP does not happen. The test_ftp.txt script is a simple ftp script that transfers one file and I know it works as I can run it successfully from DOS or NT command prompt.
Questions:
(1) Does anyone know how to pause the DOS window so you
can see what is actually happening ?
(2) Has anyone implemented FTP functionality
successfully using CLIENT_HOST in the same way that's
I'm trying ?
Any help would be appreciated.
Declan.Okay...
Try this. For testing put your command in a .bat-file. In this .bat-file spool the output to a text-file. I'm not sure about the spooling syntax under Windows, check the Windows documentation for that. Like:
ftp.bat
start spooling to ftp.out
cmd /c .... (your ftp commando line)
stop spooling
Perhaps the problem is that it doesn't find the ftp commando? Try hardcode the path like c:\windows\ftp ... etc! -
Problem while reading the file from FTP server
Hi Friends,
I have a problem while fetching files from FTP server.
I used FTP_Connect, FTP_COMMAND function modules. I can able to put the files into FTP server.
but I cant able to pick the files from FTP server.
anyone have faced similar issues kindly let me know.
Thanks
GowrishankarHi,
try this way..
for reading the file using FTP you need to use different unix command ..
Prabhuda -
How to read .xls file from FTP server t oInternal table
Hi
am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
but the data i get in LT_TEXT is special characters.
CALL FUNCTION 'FTP_SERVER_TO_R3'
EXPORTING
handle = hdl
fname = f_name "ProdDataFromCRM.xls.
* CHARACTER_MODE = 'X'
* IMPORTING
* BLOB_LENGTH =
TABLES
BLOB = lt_text
* TEXT = lt_text
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4
can any one help me out to get the exact data..
Really appreciate your quick response..
Thank YouHi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
CALL METHOD document->open_document_from_table
of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
But, who knows, perhaps you want "And Now For Something Completely Different".
Regards
Clemens -
Need to copy .txt file from FTP server and downloaded on local server directory.
I need to figure out a way to copy .txt file from ftp server in local server directory using sql jobs.
Below links will help achieving it:
https://www.virtualobjectives.com.au/sqlserver/ftp_scripts.htm
http://www.mssqltips.com/sqlservertip/2884/sql-server-integration-services-ssis-ftp-task-for-data-exchange/ -
How to read XL file from FTP server
Hi all,
I have a requirement like to read file from FTP server using path
ftp:
10.212......\DTR\DTR_ Accounted_Out
and again save other file in same location ,
to doing this RFC connection is required?
give a procedure or program to do this requirement ..
To create rfc for FTP which connection type can i use ?
Give complete settings to create rfc destinationHi Rakhi,
Use the below code to check if you have received the proper data.
call function 'FTP_SERVER_TO_R3' "Get data as character instead of BLOB
exporting
handle = hdl
fname = docid
character_mode = 'X'
tables
text = chardata.
If the data is incorrect, it is possible that you are in the wrong directory.
Use
call function 'FTP_COMMAND'
exporting
handle = hdl
command = 'cd mydir\mysubdir' "cd <space> your path
tables
data = result
exceptions
tcpip_error = 1
command_error = 2
data_error = 3.
Regards,
Jovito. -
Problem in download file from FTP server
Hi
I want to download a file from FTP server for that i am using the apache FTP module but i am not getting how to download a file with that api i can dispaly the list of files and folders but not able to download the file or folder can any one help me in this
Thanks
NinadHi
I think you miss understood something I am writing a program to download the file in Java where i have used the jakarta.apache api for that and getting problem in that bellow is the code where I have written to print the directory & file names but I don't know how to download the file
FTPClient ftpConnection = new FTPClient();
ftpConnection.connect(host);
ftpConnection.login(FTPConnection.userName,FTPConnection.password);
FTPFile fileList[] = ftpConnection.listFiles();
for(int i=0;i<fileList.length;i++)
System.out.println(fileList.getName());
thanks
Ninad -
Downloading excel file from FTP Server to Application Server
Hi,
I have to get data from an excel file available on FTP server into an Internal table.Can I use FTP_SERVER_TO_R3 to do so.
Please let me know if there are any function modules available to do this.
Thanks,
Prasuna.Dear Gayatri,
You can get the file from FTP to internal table...
I am sending you the code with inline comments ....Hope this will be helpful to you.
Data: lv_key TYPE i VALUE 26101957.
Data: lv_password(30) TYPE c.
i_rfc_destination = 'SAPFTP'.
lv_length = STRLEN( i_password ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = i_password "give ftp server pwd
sourcelen = lv_length
key = lv_key
IMPORTING
destination = lv_password.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = i_user "give ftp user name
password = lv_password
host = i_host
rfc_destination = i_rfc_destination
IMPORTING
handle = lv_ftp_handle
EXCEPTIONS
not_connected = 1
OTHERS = 2.
CONCATENATE 'cd' i_folder_path INTO lv_cmd SEPARATED BY space.
*i_folder path is the path in ftp server where file is stored
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = lv_ftp_handle
command = lv_cmd
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
lv_blob_length = 392.
TRANSLATE i_filename TO LOWER CASE.
CALL FUNCTION 'FTP_SERVER_TO_R3'
EXPORTING
handle = lv_ftp_handle
fname = i_filename "give required file name
IMPORTING
blob_length = lv_blob_length
TABLES
blob = lt_dummy.
Regards
Sajid -
Reading a file from ftp server
Hi
I am able to put file on ftp server using ftp adapter.But same settings are not working while polling file on ftp.
Do i need to do some settings for get operation??Hi,
Check the file permissions and for testing give all read/write/execute permissions to the file to be read from FTP. Also check the file modification date of the file.
Check for the logs at 2 places for any error messages:
- SOA server diagnostics logs
- FTP server logs
You can also enable the FINEST level of Adapter logs for adapters and see for the detailed errors in the diagnostic logs.
FMW Console > right click soa-infra > Logs > Log Configuration > expand oracle.soa > set Trace32 : FINEST for oracle.soa.adapter
Regards,
Neeraj Sehgal -
[HELP] Download file from FTP server
hi,
I want to write a java program that can download and upload files from ftp server. Currently I only manage to upload a file to ftp server but i cant download file from ftp server. Here is the source code that only allow user to upload file. Anyone can give me some guidelines so that my program can download and also upload file? thx.
import java.io.*;
import java.net.*;
public class FTPUpload {
private static final int CTRLPORT = 21;
private static Socket ctrlSocket;
private static PrintWriter ctrlOutput;
private static BufferedReader ctrlInput;
private static byte[] localHostAddress;
public final static String DIR = "C:\\zip\\";
public static void main(String[] args) {
try {
String host = "192.168.1.1";
String loginName = "testuser";
String password = "password";
String dirName = "/home/testuser";
String fileName = "hello.zip";
ctrlSocket = new Socket(host, CTRLPORT);
localHostAddress = ctrlSocket.getLocalAddress().getAddress();
ctrlOutput = new PrintWriter(ctrlSocket.getOutputStream());
ctrlInput = new BufferedReader(new InputStreamReader(ctrlSocket.getInputStream()));
ctrlOutput.println("USER " + loginName);
ctrlOutput.flush();
ctrlOutput.println("PASS " + password);
ctrlOutput.flush();
ctrlOutput.println("CWD " + dirName);
ctrlOutput.flush();
ctrlOutput.println("TYPE I");
ctrlOutput.flush();
FileInputStream fis = new FileInputStream(DIR + fileName);
Socket dataSocket = dataConnection("STOR " + fileName);
OutputStream outstr = dataSocket.getOutputStream();
int n;
byte[] buff = new byte[1024];
while ((n = fis.read(buff)) > 0) {
outstr.write(buff,0,n);
dataSocket.close();
fis.close();
ctrlOutput.close();
ctrlInput.close();
ctrlSocket.close();
}catch (Exception e) {
e.printStackTrace();
private static Socket dataConnection(String ctrlcmd)
throws IOException,UnknownHostException {
String cmd = "PORT ";
ServerSocket serverDataSocket = new ServerSocket(0,1);
for (int i=0;i<4;i++) {
cmd = cmd + (localHostAddress[i] & 0xff) + ",";
cmd = cmd + (((serverDataSocket.getLocalPort())/256) & 0xff)
+ ","
+ (serverDataSocket.getLocalPort() & 0xff);
ctrlOutput.println(cmd);
ctrlOutput.flush();
ctrlOutput.println(ctrlcmd);
ctrlOutput.flush();
Socket dataSocket = serverDataSocket.accept();
serverDataSocket.close();
return dataSocket;
}Or just use a java.net.URL("ftp://...) ..., get its input stream, and away you go ...
Maybe you are looking for
-
Script to query OU for last Windows update date and time
Hi All, I need help in writing a script which can query an OU in active directory and then return most recent date of windows updates installation. It will also be helpful if the script can sort the names and then send output to a file (any format wi
-
Why is this date not between these 2 date range
hi , when i execute the following select case when to_date('11/27/2006 11:58:35 PM' , 'mm-dd-yyyy hh:mi:ss am') not between to_date('11/26/2006 9:04:33 AM', 'mm-dd-yyyy hh:mi:ss am') and to_date('11/27/2006 12:02:00 PM', 'mm-dd-yyyy hh:mi:ss am') t
-
Error when using the template installer MI post installation process
Hi all, I am busy to configure the Netweaver Administrator in order to create setup packages for mobile devices. This is a WAS 6.40 ABAP JAVA instance with mobile infrastructure. I have installed the netweaver SR1 and upgraded abap and java to SPS18
-
I got an Ipod shuffle because I have two cars with USB port for mp3. It doesn't work. Can it ever?
-
Firefighter 5.1 and custom reports
We are not entirely happy with the reports FF 5.1 produces and we are not ready to upgrade to a newer release. Has anyone had any success creating any custom reports for FF 5.1? Thanks in advance for any help anyone can offer Dave Wood