FTP is corrupting binaries


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers FTP is corrupting binaries
# 1  
Old 08-13-2007
FTP is corrupting binaries

I'm ftping some binaries from a centos box to an old DEC machine. They're being transferred in bin, but they're being corrupted somehow because when I run file filename on the centos machine, it shows that it's an executable. But after the ftp and running the same command on the DEC, the file type shows data. I've tried transferring it in a .tar and cpio, but I have the same results when they're extracted.

So my question would be is if the DEC machine is having problems reading the file?
# 2  
Old 08-13-2007
It sounds as if the binaries are for a different architecture which run fine on the source machine buf fail miserably on the target machine. I would suggest FTPing the files back, in binary mode, from the old DEC machine to the centros box and then try to execute them.

If they execute normally, you can then eliminate FTP as the culprit.
# 3  
Old 08-13-2007
Quote:
Originally Posted by krisl
But after the ftp and running the same command on the DEC, the file type shows data.
How about doing an MD5 sum on the files on each machine? That will tell you if the files are faithful copies.

Are you trying to run a binary from one machine OS/architecture on a different OS/architecuture?

What operating systems are both machines? Do "uname -a" on each.
# 4  
Old 08-13-2007
A valid executable on a centos box is not going to run on an old DEC machine. You need to transfer the source code and recompile on the DEC. Even that could be rough since the old DEC may not have a modern compiler.
# 5  
Old 08-14-2007
The binaries were compiled on a DEC machine in-house. They were then gtarred and ftpd to a centos box. They then had to be ftpd to the DEC machine (no internet access). When the files are extracted, they're corrupt and not executable. Running a file filename on them shows a filetype of "data." Other non-binary files come out just fine.

The centos box doesn't have ftp running, but I'll see if I can get the service up and running and try ftping from the DEC machine. I will try the checksum.

Thanks for the suggestions. And if you can think of anything else, I would appreciate it.
# 6  
Old 08-14-2007
Maybe the original ftp from DEC to centos was in ASCII mode.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Migration of binaries from SunOS 5.5.1 to 5.11

HI, I have binary files that were generated on SUnOS 5.5.1 some years back. These programs were written in C. I want to run them on SunOS 5.11 (latest version of SunOS). Can I run them directly or will there be any porting challenges? (1 Reply)
Discussion started by: rajujayanthy
1 Replies

2. Infrastructure Monitoring

Nagios binaries for AIX 7.1

Hello All, I am new to Nagios. I have a requirement to monitor AIX 7.1 using Nagios xi, could any one guide me steps to go in right direction. I know Nagios doesn't have precompiled agent and plugin for aix 7.1. Appreciate your help (1 Reply)
Discussion started by: bsivavani
1 Replies

3. Emergency UNIX and Linux Support

bitwise and between two 32 bit binaries

Hello All, i have two 16 bit binaries that in two different variables, i want to perform a bitwise AND between the two and store the result in a different variable. can anyone throw some light on doing this in a bourne shell... eg var1= 1110101010101011 ... (8 Replies)
Discussion started by: venu
8 Replies

4. Shell Programming and Scripting

Script to compare binaries

Hi All, I am very new to scripting and wanted to write a script for comparison of folder including binary files like ear's and jars. Following is the job for which I need it: 1. Compare two folders recursively 2. Compare the binaries like ear's but exclude files like MANIFEST files 3.... (1 Reply)
Discussion started by: maverick.topgun
1 Replies

5. UNIX for Dummies Questions & Answers

Why does /bin contain binaries for builtins?

Why do shell builtins like echo and pwd have binaries in /bin? When I do which pwd, I get the one in /bin. that means that I am not using the builtin version? What determines which one gets used? Is the which command a definitive way to determine what is being run when I enter pwd? (16 Replies)
Discussion started by: glev2005
16 Replies

6. UNIX for Dummies Questions & Answers

Stripping down binaries

Hello, I am the CEO of Grand Tech Corporation. We are launching Linux NT and forgive me, but I do not know how to strip binaries down in Mandriva Linux. Can someone tell me a way to?:b: (2 Replies)
Discussion started by: Linux NT
2 Replies

7. UNIX for Advanced & Expert Users

Corrupting ext3 paration

hi guys, I am testing some embedded device.. In which there were a bug due to the corruption of the ext3 partition. ( if the partition was currapated all system was crashing ) Now developers are mounting that particular partition to check whether it is corrupted or not and taking other... (4 Replies)
Discussion started by: Gaurang033
4 Replies

8. Solaris

How to compare binaries

I have the same two source files. They MUST be compiled with -g debugger option. The binaries are different. But in fact the binaries work the same. How to compare them to know the are compiled using the same source code. In Linux it is enough to: strip --strip-all <file> and diff shows no... (2 Replies)
Discussion started by: mblank
2 Replies

9. Solaris

compare two binaries.

Dear I want to know how i can compare between two binaries by using check sum command. (2 Replies)
Discussion started by: abu_hassan
2 Replies

10. UNIX for Dummies Questions & Answers

Windows Binaries

This is probably a really stupid question: Why doesnt windows binaries run in *nix? Is it the filesystem? or what? //Maestin (3 Replies)
Discussion started by: Maestin
3 Replies
Login or Register to Ask a Question