LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-02-2004, 12:10 AM   #1
tumana
Member
 
Registered: Mar 2004
Location: Belgium
Posts: 102

Rep: Reputation: 15
Corrupt Images when loaded through FTP


Hey everybody,

I'll just get to the point... I am running a HTTP/FTP server with Mandrake 10, and my problem is with the FTP server (proftp).

My local network (a few computers and a server) is all plugged into my router, which I do not think is the problem. I usually develop my website on my workstation, and once finished I upload the files/images to the server via FTP. Internet Explorer used to connect to my FTP internal address very quickly; I would even say it took less than a second.

Now I open IE and it hangs for about 10 seconds, a little flash light appears showing that it's searching for something, and finally I am prompted with a username and password. After uploading the content, I check it with a web browser and some images are corrupt. It's easy to fix because I just upload those individually, over writing the corrupt images, and it works fine.

I'm biased, so I automatically accused IE. I downloaded an FTP client and did the same thing; the same thing happened and about 10% of my pictures are corrupt. I then tried it from my roommate's computer, which took just as long and had the same results. I'm certain it's the server.

It hasn't been rebooted in a while, so I tried that. Nope. Nothing has changed on my server, but images won't upload completely. I'm serious when about 10% of my images get corrupt.

Can someone help me, please? I don't want to reload my server, but this is killing me.

Thanks in advance,
Ian
 
Old 09-03-2004, 04:15 AM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
That's a rough one to tackle because it's not absolute. Having only 10% and a random 10% at that is very hard to diagnose. If it were the last 10% or the images over XXMb then there might be something to look at (network congestion, update NIC drivers/kernel, etc..). So, I wouldn't say 'reload your server' but rather update your version of proftpd, update your router's firmware to the latest, ensure the ports are all forwarded correctly (don't forget passive FTP ports: I had many a day wasted on working with FTP only to find that I was attempting to work via Passive without forwarding the passive ports, which did indeed act similar to your description of the hesitating authentications) if possible try, just for kicks, a different router, process of elimination at this point.

Finally, if it's only images, maybe it's a problem with the ascii versus binary FTP uploads. It's been a while for me, so check your man page, but IIRC there is indeed a way to set the type of upload you are sending, and switching between the 2 to see if that makes a difference might be worth your while.

Good Luck!

Cool
 
Old 09-03-2004, 05:46 AM   #3
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Try sending files through ssh. If the files are not corrupted, then you can blame proftp and reconfigure it to make it work more reliable. If the files are corrupted, then something is wrong with your network or your network settings on your Linux system. If you have iptables up, you could have set port 21 in time burst mode and it is stopping packets at a certain time has pass.
 
Old 09-03-2004, 07:27 AM   #4
tumana
Member
 
Registered: Mar 2004
Location: Belgium
Posts: 102

Original Poster
Rep: Reputation: 15
Thanks to both... I will look at that, but I have a question about using SSH to copy my files. I googled SSH commands and I found the scp command to secure copy.

This is my situation: I'm on a Windows box as a workstation (I'm working on changing that), using PuTTy (an SSH client) to SSH into my web/ftp server running Linux (which might be having FTP problems). How do I copy files from my Windows box to my Linux server over SSH? This is what I've found.

If I'm connecting to my server via SSH (using PuTTy), who is the "remote machine"? Is it my workstation that I'm connecting from, or is it the server I'm connected to? If it is my workstation, do I need an SSH daemon running on it so it can make the file exchange? I've tried using the commands both ways and it tells me
Code:
ssh: c: Name or service not known
By "c:" it's referring to the windows path name (for example: c:\Test).

But thank you for the replies. Reading over my first post I realized I was sleep deprived and a little stressed. By "10%" I didn't mean literally 1 out of every 10 pictures. I meant I wasn't talking about one picture, but a bunch of pictures get corrupt; enough to put a small percentage on the average. I'll be more carefull next time. My bad.

ian
 
Old 09-03-2004, 07:33 AM   #5
bruj3w
Member
 
Registered: Mar 2004
Location: england
Distribution: slackware
Posts: 164

Rep: Reputation: 30
does transfers via ftp in binary mode. problem sorted :>
 
Old 09-03-2004, 11:25 AM   #6
zajaco0
LQ Newbie
 
Registered: Jul 2004
Location: Kentucky
Distribution: FC4
Posts: 18

Rep: Reputation: 0
Just a quick question, how do you upload to your FTP server? Do you use the CLI FTP in the CMD...(Comand line interface FTP in the Command prompt)? I have had trouble with images getting corrupted while using that method. I just downloaded SmartFTP and put it on my machine, now I can just drag/drop to my FTP server, and everything works fine.
 
Old 09-03-2004, 02:39 PM   #7
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Are you using binary mode when transferring the images files?
 
Old 09-03-2004, 02:57 PM   #8
nkraft
LQ Newbie
 
Registered: Sep 2003
Location: York, PA
Distribution: MAndrake, Slackware
Posts: 8

Rep: Reputation: 0
binary mode should make it work.

also more information about sftp (secure ftp)

http://acs.ucsd.edu/info/sftp.php

hope this can help
 
Old 09-03-2004, 04:35 PM   #9
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
tumana, you will have to turn on ssh on Mandrake if it is installed. You can use either Mandrake Control Center or as su type "service sshd start" to load ssh. I suggest you read some documentation to make it more secured by not letting root and only letting users that are part of a group.

The program that I used on Windows machines is from http://www.ssh.com. You will have to look through their site to download the free version. On Linux systems I use gftp or konqueror to transfer files through sftp or ftp over ssh.

You will have to open port 22 in your router and firewall to let users access your server.

To speed up Mandrake on a network, do some searching on the file host.conf.
 
Old 09-03-2004, 10:37 PM   #10
tumana
Member
 
Registered: Mar 2004
Location: Belgium
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
...transfers via ftp in binary mode...
Hmm... I don't know what that is. I'll have to look that up.
Quote:
...how do you upload to your FTP server...
I used to use plain old Internet Explorer (IE). Instead of an http address, I would use an ftp address.
Quote:
I just downloaded SmartFTP...
I did that too, but it still happened.
Quote:
...you will have to turn on ssh on Mandrake if it is installed...
It's installed and running on my server (sshd). I use an SSH client to connect to it from my Windows box called PuTTy. That worked for 8 months!

Thanks for all your help. I'll spend a little time reading about all I collected on this forum. I'll post what I did to fix the problem eventually, even if I reload. *sigh*

ian
 
Old 09-08-2004, 04:16 AM   #11
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
PUtty comes with an scp tool...

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert cd images to dvd images rcsuk Debian 2 07-11-2005 10:34 AM
Video files corrupt over ftp ixus_123 Linux - General 5 01-19-2005 05:14 PM
paraport_pc module loaded with wrong options, st not loaded adrianmariano Debian 2 12-18-2004 09:37 PM
Corrupt DF output DaCypher Linux - Software 1 08-16-2004 11:05 AM
Corrupt Desktop captgoodnight Linux - General 2 02-17-2002 02:19 AM


All times are GMT -5. The time now is 08:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration