Forum Moderators: bakedjake

Message Too Old, No Replies

Why ftp output truncated to 2000 files?

But not on all servers

         

anallawalla

11:57 pm on Jul 15, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The dedicated server I rent and some shared hosts I use all seem to use Pure-FTPd and all have the following features:

* WS_FTP shows only 2000 files in the remote directory, even if there are more. This often means I cannot see and retrieve the index file unless I use the command line.

* I can never upload more than a few hundred (might be 2000) files in one attempt.

A friend uses some other shared host and when I log into his ftp account (with permission), I can see over 30,000 files in the remote directory (not truncated to 2000). Therefore it isn't a WS_FTP thing. Is there some setting in Pure-FTPd that limits the number of files displayed to me? I couldn't find anything obvious in the docs at the program's home.

- Ash

encyclo

7:43 pm on Jul 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is an explanation in the PureFTPD readme under "OPTIONS":

[pureftpd.org...]

- '-L <max files>:<max depth>': To avoid stupid denial-of-service attacks (or just CPU hogs), Pure-FTPd never displays more than 2000 files in response to an 'ls' command. Also, a recursive 'ls' (-R) never goes further than 5 subdirectories. You can increase/decrease those limits with the '-L' option.

Are you able to reconfigure and restart the daemon with the required switches? There is also a bandwidth limitation setting for uploads/downloads. Sorry it's been a long while since I've used PureFTPD so I can't remember the details... :)

anallawalla

8:21 pm on Jul 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Thanks, encyclo! I think I can recompile it on my server. Will soon find out. :)

encyclo

8:25 pm on Jul 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure you have to recompile it - try stopping the daemon and restarting it with the switch:

/usr/sbin/pure-ftpd -L 50000:10

(or something similar - the above is 50,000 file limit and 10 recursive directories if I have the syntax right). If that works, then you can alter your startup options.

n19ht

1:53 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



you can also edit your pure-ftpd configfile

vi /etc/pure-ftpd.conf


# 'ls' recursion limits. The first argument is the maximum number of
# files to be displayed. The second one is the max subdirectories depth

LimitRecursion    2000 8

and change these two parameters.