HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   verry verry slow directory listung with pure-ftpd (http://www.howtoforge.com/forums/showthread.php?t=37055)

tom 27th June 2009 13:15

verry verry slow directory listung with pure-ftpd
 
The connection to pure-ftpd works. But hours later the content of the directorys are shown.

I've tried several ftp clients but each client say hours "working ..."
I'm using pure-ftpd --without-capabilities for virtuozzo

Any idea why that is so slow?

till 27th June 2009 13:19

Most like ly a problem with name resolution. You should disable nameresolution in the pureftpd configuration. The Option is named "DontResolve".

tom 27th June 2009 13:39

Where to set this option?

I can't find pure-ftpd.conf to edit. Does /etc/default/pure-ftpd-common replace /etc/pure-ftpd/pure-ftpd.conf ?
Where are the pure-ftpd start options been set like "-b -A -u 1000 -E -B"?

My question arises by reading the pure-ftpd webseite
Code:

Unlike many daemons, Pure-FTPd doesn't read any configuration file (but for
LDAP and SQL). Instead, it uses command-line options. For instance, the '-H'
flag is designed to speed up highly loaded servers, by avoiding DNS lookups.
To enable this, just add it to the server name:

/usr/local/sbin/pure-ftpd -H

So I suppose "-H" does the same as "DontResolve"?

till 27th June 2009 13:54

Which Linux distribution?

tom 27th June 2009 14:04

Quote:

Originally Posted by till (Post 196650)
Which Linux distribution?

Debian Lenny

till 27th June 2009 14:07

Execeute these commands to turn off resolving:

Code:

echo 'yes' > /etc/pure-ftpd/conf/DontResolve
/etc/init.d/pure-ftpd-mysql restart


tom 27th June 2009 14:25

Ok, pure-ftpd works with the -H option now.
BUT still the directory listing ist verry slow. It seem to me it's only very slow if no files are in the directory which is chosen to list the content.
Directories with content like web,tmp are fast in listing the files.

By the way:I'm suppised about the differens
Code:

h1:/etc/pure-ftpd/conf# ls -al
insgesamt 48
drwxr-xr-x 2 root root 4096 27. Jun 14:11 .
drwxr-xr-x 5 root root 4096 27. Jun 13:35 ..
-rw-r--r-- 1 root root  36  2. Nov 2008  AltLog
-rw-r--r-- 1 root root    4 27. Jun 11:30 BrokenClientsCompatibility
-rw-r--r-- 1 root root    4 27. Jun 11:30 ChrootEveryone
-rw-r--r-- 1 root root    4 27. Jun 14:10 DontResolve
-rw-r--r-- 1 root root    5  2. Nov 2008  MinUID
-rw-r--r-- 1 root root  29 25. Jun 21:52 MySQLConfigFile
-rw-r--r-- 1 root root    4  2. Nov 2008  NoAnonymous
-rw-r--r-- 1 root root    4  2. Nov 2008  PAMAuthentication
-rw-r--r-- 1 root root  28  2. Nov 2008  PureDB
-rw-r--r-- 1 root root    3  2. Nov 2008  UnixAuthentication

and
Code:

vi /var/lib/dpkg/info/pure-ftpd-common.conffiles
/etc/logrotate.d/pure-ftpd-common
/etc/ftpallow
/etc/pure-ftpd/conf/AltLog
/etc/pure-ftpd/conf/MinUID
/etc/pure-ftpd/conf/NoAnonymous
/etc/pure-ftpd/conf/PAMAuthentication
/etc/pure-ftpd/conf/PureDB
/etc/pure-ftpd/conf/UnixAuthentication
/etc/pure-ftpd/pureftpd-dir-aliases

Should it not be tell the same files?

tom 2nd July 2009 22:43

The reason for verry slow directory listing - actually is mean read "working ..." an waitin - is the firewall in together with passiv ftp. Passiv ftp is not possible if the ispconfig default firefall is enabled. Without the firewall passiv ftp is possible. I dont unterstand why, because the ports 21,20 are still oben with the active firewall.

How to configure firewall to go with passiv ftp?
Propably iptable should open port from 21-1024 but how to configure with ispconfig? 21-1024 or 21:1024 gives a configuration error.

Mark_NL 3rd July 2009 08:42

To get passive working properly, you need to do a few things:

- Make up a range between 1025 and 65535 .. (f.e. 3000-4000)
- Add that range to you firewall, so those ports are open (accepted)
- Now open the pure-ftpd config file and look for a line that says "PassivePortRange", uncomment this line and change it to: PassivePortRange 3000 4000
- restart pure-ftpd

If the ISPConfig filewall script is giving you a hard time use:

iptables -A INPUT -p tcp -m multiport --dports 3000:4000 -j ACCEPT

p.s. i would never use port numbers < 1024 for your own usage, since most of them are reserved for other services, which COULD lead to other problems.


All times are GMT +2. The time now is 05:09.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.