FTP download files problem

sintsu

Verified User
Joined
Sep 4, 2008
Messages
33
Location
Taiwan
Hi all,
I used DA about three month, and solve many problems from the posts in forum, but I have one weird problem with my proftpd.

I could upload pictures documents(.doc and .pdf) and html files through FTP and working well to view or open document with the browser, but when I use FTP to download pictures and documents the problem happens, all the files exclude the html can not open in my PC, and I'm quite sure it's not my FTP client's fault, the FTP client command are list below

Code:
227 Entering Passive Mode (61,x,230,x,139,83).
       RETR Tasting Notes_APP.pdf
150 Opening BINARY mode data connection for Tasting Notes_APP.pdf (959575 bytes)
       CWD /public_html
250 CWD command successful
       TYPE A
200 Type set to A
       PASV
227 Entering Passive Mode (61,x,230,x,139,158).
       RETR 500.shtml
150 Opening ASCII mode data connection for 500.shtml (515 bytes)
226 Transfer complete

Is there any idea about this problem ?? thanks alot

Sintsu
 
I used Filezilla, FireFTP, and Dreamweaver8 and CS3, all of them faced the same problem, I really want to know what should I do to solve this problem, thanks.
 
My guess is that you're downloading as ASCII, which changes each file. Try downloading as BINARY.

Jeff
 
Thanks for your reply Jeff, but the ftp client shows that it already download the pdf(jpg) file in BINARY mode, and download text-like file in ASCII mode.
 
check the sizes; are they the same or is one bigger? If one is bigger, which one?

Do an md5sum on the file on the server and the file on your desktop. Are they the same?

Jeff
 
The file size doesn't change, but the md5 result were different.
How can I solve this problem? I already try to upgrade my DA and use custombuild to upgrade and reinstall ProFTP, but it didn't work at all.
 
Strange are you sure it has some thign to do with direct admin? and not ftp?
 
Yes, it appears to be an FTP problem, and most likely has nothing to do with DirectAdmin.

You might want to try getting it by ftp, into another directory (perhaps your home directory) on your server, ftping localhost from the command line, to see if it changes there. That might help you narrow down the problem.

Jeff
 
I think it's ProFTP's problem too, but although I reinstalled the ProFTP or upgraded from 1.3.1 to 1.3.2rc also couldn't solve it. My proftpd.conf is here

Code:
ServerName        "ProFTPd"
ServerType              standalone

Port            21
PassivePorts        35000 35999
UseReverseDNS        off
TimesGMT        off
TimeoutLogin        180
TimeoutIdle        600
TimeoutNoTransfer    900
TimeoutStalled        3600

ScoreboardFile            /var/run/proftpd/proftpd.pid

TransferLog        /var/log/proftpd/xferlog.legacy
LogFormat        default "%h %l %u %t \"%r\" %s %b"
LogFormat        auth    "%v [%P] %h %t \"%r\" %s"
LogFormat        write   "%h %l %u %t \"%r\" %s %b"

#DON'T modify this log format.  Its used by DirectAdmin to determine user usage
LogFormat        userlog "%u %b"
ExtendedLog        /var/log/proftpd/server_log bytes WRITE,READ userlog

AuthUserFile                    /etc/proftpd.passwd
DefaultServer        on

#AuthPAM off

<IfModule mod_tls.c>
    TLSEngine on
    TLSLog /var/log/proftpd/proftpd.tls.log
    TLSProtocol TLSv1
    TLSVerifyClient off
    TLSRequired off
    
    #Certificates
    TLSRSACertificateFile /etc/exim.cert
    TLSRSACertificateKeyFile /etc/exim.key
    #TLSCACertificateFile /etc/ftpd/root.cert.pem
</IfModule>

<Global>
    DeferWelcome        on

    RequireValidShell    no

    DefaultRoot        ~
    DirFakeUser on ftp
    DirFakeGroup on ftp

    User            ftp
    Group            ftp
    #UserAlias        anonymous ftp

    AllowStoreRestart    on
    AllowRetrieveRestart    on

    ListOptions        -a

    Umask            022
    DisplayLogin        welcome.msg
    DisplayChdir        readme
    AllowOverwrite        yes
    IdentLookups        off
    ExtendedLog        /var/log/proftpd/access.log WRITE,READ write
    ExtendedLog        /var/log/proftpd/auth.log AUTH auth
    
    #
    # Paranoia logging level....
    #
    #ExtendedLog    /var/log/proftpd/paranoid.log ALL default

</Global>

Include /etc/proftpd.vhosts.conf
 
Yes, it appears to be an FTP problem, and most likely has nothing to do with DirectAdmin.

You might want to try getting it by ftp, into another directory (perhaps your home directory) on your server, ftping localhost from the command line, to see if it changes there. That might help you narrow down the problem.

Jeff

I also try to copy one pic from one account to another in same server, after that the pic in destination folder can not open via browser, it's very depressed...:(
When I comfirm the problem is due to the ProFTPd, how can I do to solve it ? Uninstall the ProFTPd then reinstall it by custombuild ?
 
I have no idea. Nor do I think the problem is specifically ProFTPd; if it were a lot of people would be reporting it.

Jeff
 
I think you need to let an administrator look at your server.
 
It may be some broken library used by ProFTPd, if you modified the version and the problem is still there.
This can be caused by, in order of probability:
  • broken RAM
  • broken HD
  • any hardware problem that causes faulty reads in RAM and/or HD
  • you did some nasty things to the libraries yourself
  • rootkit: someone installed broken/old libraries in your system, because they are patched to hide something
These are all the possibilities I can think of.

Of course there might be a undiscovered or unpatched very, very rare bug in ProFTPd... but that's at the very bottom of a huge list ;)
 
Thanks floyd tillo and Jeff, I think I found the problem.
I called DirectAdmin Support, and John relly do me a great favor.
After his test, he gave me the following result
My guess is that there is some corruption somewhere... possibly a library/binary... or even some hardware may be on it's way out (ram, or HD)...
But I cannot be sure of anything since it is a bit random...

Finally, I reset the server, and everything back to normal .....
I guess (about 70% sure) the problem is due to the Xcache, because the error is random, and most occur in images that will cache in the ram.
My server use ECC ram without register, I don't know whether it is the problem comes from.
 
Finally, I reset the server, and everything back to normal .....
I guess (about 70% sure) the problem is due to the Xcache, because the error is random, and most occur in images that will cache in the ram.
My server use ECC ram without register, I don't know whether it is the problem comes from.
XCache doesn't have anything to do with ProFTPd, and the fact that you use ECC memory means that you probably don't have a faulty RAM... I suspect a faulty HD or data bus somewhere between HD/CPU/RAM: the library was read wrong the last time linux did a mmap() on it, and it was kept in RAM until you rebooted.
Unfortunately there are no general tests for HD or motherboard bus... if you have hardware support I suggest you call it, otherwise find some dedicated tests for your HD and motherboard models.
It may never happen again of course, but if it's running critical software it's best to be proactive.

I also suggest that you run an istance of rkhunter and chkrootkit, the probability that it happened because of a rootkit is low but it's still possible: some rootkits reside in a kernel module, can create this kind of problems and can be whashed out at reboot, if the module is not loaded at boot.
 
It may be some broken library used by ProFTPd, if you modified the version and the problem is still there.
This can be caused by, in order of probability:
  • broken RAM
  • broken HD
  • any hardware problem that causes faulty reads in RAM and/or HD
  • you did some nasty things to the libraries yourself
  • rootkit: someone installed broken/old libraries in your system, because they are patched to hide something
These are all the possibilities I can think of.

Of course there might be a undiscovered or unpatched very, very rare bug in ProFTPd... but that's at the very bottom of a huge list ;)

It's depressed me that this problem still occur in my system.
I bought four 1G-ECC ram to replace the old ones, and fsck check my HD, and I only install the packages that support by DA through custombuild and update.script.
Also try the latest rkhunter to scan my filesystem...nothing special found :(
I have no idea whether I mass up the libraries used by proftpd, but before I reinstalll the whole OS, I encounter the same problem.
Btw I am using DELL SC430 with new Apacer DDR667-1G*4 ECC memory and hardware RAID1 by this

Could anybody give me a hint to figure out that this is a hardware or software or setting problems....thanks in advance
 
Hi,

I have the same problem as well.

I appears when user creates a virtual FTP account username and customer domain name ([email protected]).
When connecting to it, it just get stuck on "Entering passive mode".
Meanwhile, if you try to connect using just username and server's own hostname, ([email protected]) it works fine.

I am pretty sure is the way ProFTPd handles it, as I have an old DA server running ProFTPd 1.2.10 and over there it works fine.
As we moved our customers to newer, faster machine using firstly 1.3.0 but now 1.3.2, this never worked.

The question is if we can downgrade proftpd to 1.2.10?
I can't do it on centos 5.2 as compilator gives me errors when trying to compile it.

Can anyone else try it out?
 
Back
Top