
9th April 2008, 18:30
|
|
Junior Member
|
|
Join Date: Apr 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problems with ftp disconnections!
Hi!
I have a problem with my fpt server. When i upload, download or remove files on the server i keep getting disconnected.
For example, when uploading Joomla to one of my web sites i get dissconected repetedly.
Code:
Command: DELE components.php
Response: 250 DELE command successful
Command: CWD /web/administrator/components/com_installer/
Response: 250 CWD command successful
Command: PWD
Response: 257 "/web/administrator/components/com_installer" is current directory.
Command: RMD models
Response: 250 RMD command successful
Status: Retrieving directory listing...
Command: CWD views
Response: 250 CWD command successful
Command: PWD
Response: 257 "/web/administrator/components/com_installer/views" is current directory.
Command: PASV
Response: 227 Entering Passive Mode (217,151,53,162,148,109).
Command: LIST
Response: 150 Opening ASCII mode data connection for file list
Response: 226 Transfer complete.
Status: Directory listing successful
Command: DELE index.html
Response: 250 DELE command successful
Status: Retrieving directory listing...
Command: CWD components
Response: 250 CWD command successful
Command: PWD
Response: 257 "/web/administrator/components/com_installer/views/components" is current directory.
Command: PASV
Error: Disconnected from server
Error: Failed to retrieve directory listing
I run proftpd on my server in SSL/TLS mode, and use FileZilla for the uploading. I can for the life of me not figure out what is wrong.
PROFTPD.CONF
Code:
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#
# Includes DSO modules
Include /etc/proftpd/modules.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6 off
DefaultRoot ~
IdentLookups off
ServerIdent on "FTP Server ready."
ServerName "Debian"
ServerType standalone
DeferWelcome off
MultilineRFC2228 on
DefaultServer on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
DisplayLogin welcome.msg
DisplayFirstChdir .message
ListOptions "-l"
DenyFilter \*.*/
# Use this to jail all users in their homes
# DefaultRoot ~
# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell off
# Port 21 is the standard FTP port.
Port 21
# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts 49152 65534
PassivePorts 37990 38000
# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
MasqueradeAddress 217.151.53.162
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User proftpd
Group nogroup
# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask 022 022
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Uncomment this if you are using NIS or LDAP to retrieve passwords:
# PersistentPasswd off
# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile off
# Choose a SQL backend among MySQL or PostgreSQL.
# Both modules are loaded in default configuration, so you have to specify the backend
# or comment out the unused module in /etc/proftpd/modules.conf.
# Use 'mysql' or 'postgres' as possible values.
#
#<IfModule mod_sql.c>
# SQLBackend mysql
#</IfModule>
TransferLog /var/log/proftpd/xferlog
SystemLog /var/log/proftpd/proftpd.log
<IfModule mod_tls.c>
TLSEngine on
TLSLog /var/log/proftpd/tls.log
TLSProtocol SSLv23
TLSOptions NoCertRequest
TLSRSACertificateFile /etc/proftpd/ssl/proftpd.cert.pem
TLSRSACertificateKeyFile /etc/proftpd/ssl/proftpd.key.pem
TLSVerifyClient off
TLSRequired off
</IfModule>
<IfModule mod_quota.c>
QuotaEngine on
</IfModule>
<IfModule mod_ratio.c>
Ratios on
</IfModule>
# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>
<IfModule mod_ctrls.c>
ControlsEngine on
ControlsMaxClients 2
ControlsLog /var/log/proftpd/controls.log
ControlsInterval 5
ControlsSocket /var/run/proftpd/proftpd.sock
</IfModule>
<IfModule mod_ctrls_admin.c>
AdminControlsEngine on
</IfModule>
# A basic anonymous configuration, no upload directories.
# <Anonymous ~ftp>
# User ftp
# Group nogroup
# # We want clients to be able to login with "anonymous" as well as "ftp"
# UserAlias anonymous ftp
# # Cosmetic changes, all files belongs to ftp user
# DirFakeUser on ftp
# DirFakeGroup on ftp
#
# RequireValidShell off
#
# # Limit the maximum number of anonymous logins
# MaxClients 10
#
# # We want 'welcome.msg' displayed at login, and '.message' displayed
# # in each newly chdired directory.
# DisplayLogin welcome.msg
# DisplayFirstChdir .message
#
# # Limit WRITE everywhere in the anonymous chroot
# <Directory *>
# <Limit WRITE>
# DenyAll
# </Limit>
# </Directory>
#
# # Uncomment this if you're brave.
# # <Directory incoming>
# # # Umask 022 is a good standard umask to prevent new files and dirs
# # # (second parm) from being group and world writable.
# # Umask 022 022
# # <Limit READ WRITE>
# # DenyAll
# # </Limit>
# # <Limit STOR>
# # AllowAll
# # </Limit>
# # </Directory>
#
# </Anonymous>
DefaultRoot ~
#Include /etc/proftpd_ispconfig.conf
Any ideas what may cause this disconnecting issue? FileZilla is more or less at it's default settings.
My server is installed using this guide, http://www.howtoforge.com/perfect_setup_ubuntu704
I have also installed ISPConfig and Webmin on the server, and activated SSL/TLS using this guide, http://www.howtoforge.com/proftpd-tls-debian-etch
Last edited by Allmight; 9th April 2008 at 18:56.
|

9th April 2008, 19:13
|
|
Junior Member
|
|
Join Date: Apr 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
After scanning the ftp logs, i found this in proftpd.log
Code:
Apr 09 18:23:21 ws1.allsoftstudios.com proftpd[5159] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session closed.
Apr 09 18:23:44 ws1.allsoftstudios.com proftpd[5168] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP no transfer timeout, disconnected
Apr 09 18:23:44 ws1.allsoftstudios.com proftpd[5168] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session closed.
Apr 09 18:23:48 ws1.allsoftstudios.com proftpd[5167] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP no transfer timeout, disconnected
Apr 09 18:23:48 ws1.allsoftstudios.com proftpd[5167] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session closed.
Apr 09 18:23:52 ws1.allsoftstudios.com proftpd[5166] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP no transfer timeout, disconnected
Apr 09 18:23:52 ws1.allsoftstudios.com proftpd[5166] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session closed.
Apr 09 18:24:02 ws1.allsoftstudios.com proftpd[5173] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP no transfer timeout, disconnected
Apr 09 18:24:02 ws1.allsoftstudios.com proftpd[5173] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session closed.
Apr 09 18:24:11 ws1.allsoftstudios.com proftpd[5178] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP no transfer timeout, disconnected
Apr 09 18:24:11 ws1.allsoftstudios.com proftpd[5178] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session closed.
Apr 09 18:24:15 ws1.allsoftstudios.com proftpd[5179] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): Passive data transfer failed, possibly due to network issues
Apr 09 18:24:15 ws1.allsoftstudios.com proftpd[5179] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): Check your PassivePorts and MasqueradeAddress settings,
Apr 09 18:24:15 ws1.allsoftstudios.com proftpd[5179] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): and any router, NAT, and firewall rules in the network path.
Apr 09 18:24:15 ws1.allsoftstudios.com proftpd[5179] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP no transfer timeout, disconnected
Apr 09 18:24:15 ws1.allsoftstudios.com proftpd[5179] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session closed.
Apr 09 18:30:01 ws1.allsoftstudios.com proftpd[5424] ws1.allsoftstudios.com (localhost.localdomain[127.0.0.1]): FTP session opened.
Apr 09 18:30:01 ws1.allsoftstudios.com proftpd[5424] ws1.allsoftstudios.com (localhost.localdomain[127.0.0.1]): FTP session closed.
Apr 09 18:32:32 ws1.allsoftstudios.com proftpd[5284] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP no transfer timeout, disconnected
Apr 09 18:32:32 ws1.allsoftstudios.com proftpd[5284] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session closed.
Apr 09 19:00:01 ws1.allsoftstudios.com proftpd[5798] ws1.allsoftstudios.com (localhost.localdomain[127.0.0.1]): FTP session opened.
Apr 09 19:00:01 ws1.allsoftstudios.com proftpd[5798] ws1.allsoftstudios.com (localhost.localdomain[127.0.0.1]): FTP session closed.
Seems proftpd keep closing the connection for no transfer timeout, even though i am in the middle of an upload session.
Here's another error i get in the middle of an upload...
Code:
Apr 09 19:27:00 ws1.allsoftstudios.com proftpd[6269] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session opened.
Apr 09 19:27:00 ws1.allsoftstudios.com proftpd[6269] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): USER web1_allmight: Login successful.
Apr 09 19:27:00 ws1.allsoftstudios.com proftpd[6269] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): Preparing to chroot to directory '/var/www/web1'
Apr 09 19:27:00 ws1.allsoftstudios.com proftpd[6269] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): mod_delay/0.5: delaying for 677 usecs
Apr 09 19:27:08 ws1.allsoftstudios.com proftpd[6272] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session opened.
Apr 09 19:27:08 ws1.allsoftstudios.com proftpd[6272] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): USER web1_allmight: Login successful.
Apr 09 19:27:08 ws1.allsoftstudios.com proftpd[6272] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): Preparing to chroot to directory '/var/www/web1'
Apr 09 19:27:08 ws1.allsoftstudios.com proftpd[6272] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): mod_delay/0.5: delaying for 924 usecs
Apr 09 19:27:23 ws1.allsoftstudios.com proftpd[6275] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): FTP session opened.
Apr 09 19:27:23 ws1.allsoftstudios.com proftpd[6275] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): mod_delay/0.5: delaying for 10 usecs
Apr 09 19:27:23 ws1.allsoftstudios.com proftpd[6275] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): USER web1_allmight: Login successful.
Apr 09 19:27:23 ws1.allsoftstudios.com proftpd[6275] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): Preparing to chroot to directory '/var/www/web1'
Apr 09 19:27:23 ws1.allsoftstudios.com proftpd[6275] ws1.allsoftstudios.com (217.151.53.164[217.151.53.164]): mod_delay/0.5: delaying for 24 usecs
Apr 09 19:27:32 ws1.allsoftstudios.com proftpd[6150] ws1.allsoftstudios.com: MaxInstances (30) reached, new connection denied
Apr 09 19:27:37 ws1.allsoftstudios.com proftpd[6150] ws1.allsoftstudios.com: MaxInstances (30) reached, new connection denied
Apr 09 19:27:42 ws1.allsoftstudios.com proftpd[6150] ws1.allsoftstudios.com: MaxInstances (30) reached, new connection denied
Apr 09 19:27:47 ws1.allsoftstudios.com proftpd[6150] ws1.allsoftstudios.com: MaxInstances (30) reached, new connection denied
Apr 09 19:27:47 ws1.allsoftstudios.com proftpd[6150] ws1.allsoftstudios.com: MaxInstances (30) reached, new connection denied
Apr 09 19:27:52 ws1.allsoftstudios.com proftpd[6150] ws1.allsoftstudios.com: MaxInstances (30) reached, new connection denied
Apr 09 19:27:52 ws1.allsoftstudios.com proftpd[6150] ws1.allsoftstudios.com: MaxInstances (30) reached, new connection denied
MaxInstances (30) reached, new connection denied, what does this mean? When it happens, the client is unable to reconnect and resume upload.
And the passive ports are opened in the firewall. I mean, i can connect in passive mode, and upload/download just fine. Just that i get disconnected all the time.
Last edited by Allmight; 9th April 2008 at 19:41.
|

10th April 2008, 17:26
|
|
Junior Member
|
|
Join Date: Apr 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Okay, seems i get the exact same problem with vsftpd. I get disconnected all the time. I can live with it during uploads since the client reconnects automatically and continues. But when i am deleting large amounts of files over ftp, i get disconnected every 4 seconds or so, and have to reconnect manually and manually start the delete process again.
The disconnection part is not after a specific command, but happens at random places during the process.
I get the same with both proftpd and vsftpd. I use FileZilla.
Same server setup as specified in the first post, just changed from proftpd to vsftpd.
Anyone know what's going on here, and how to remedy this problem?
Last edited by Allmight; 10th April 2008 at 17:28.
|

10th April 2008, 18:06
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Did you try both active and passive transfers in your FTP client?
Is there a firewall on the server?
|

10th April 2008, 18:51
|
|
Senior Member
|
|
Join Date: Nov 2007
Posts: 184
Thanks: 2
Thanked 6 Times in 6 Posts
|
|
Does the same thing happen if you use a command line
ftp client ?
|

10th April 2008, 19:08
|
|
Junior Member
|
|
Join Date: Apr 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
@Falko
Yes, the iptables firewall is on the server, and the server itself it connected directly to the internet. No router in between.
I have tried both Active and Inactive. But in Active i cannot even get a complete connection to the server, get stuck at the LIST part of the login, as you may remember from another post.
@Chipsafts
No, i havn't. My personal computer is a Vista one, and running under Windows you easily get spoiled by GUI tools. Don't even know how, if at all possible to run ftp over the console.
In my router i have port maped port 20 and 21 and the passive ports to my computer. Note, personally, i am behind a router, but the server is not.
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 14:15.
|
|
Recent comments
14 hours 23 min ago
14 hours 28 min ago
19 hours 26 min ago
1 day 2 hours ago
1 day 2 hours ago
1 day 4 hours ago
1 day 8 hours ago
1 day 15 hours ago
1 day 18 hours ago
1 day 20 hours ago