my ftp server disconnects when trying to do an ls -R

Fahrvergnuugen

I am the law!
When you log into my ftp server and do an ls -R it starts listing the directories recursively but then suddenly after a few seconds the server disconnects the client. I'm guessing that maybe xident is killing the process because its taking too long?

I'm using pureftpd www.pureftpd.com as my ftp server. I changed my /etc/xident.d/ftp file to use the pureftpd binary

service ftp
{
disable = no
socket_type = stream
wait = no
user = root
#server = /usr/libexec/ftpd
server = /usr/local/sbin/pure-ftpd
#server_args = -l
server_args = -l puredb:/etc/pureftpd.pdb -L 4900:5 &
groups = yes
flags = REUSE
}

-L 5000:5 increases the default max recursion limit from 2000 to 5000. Somewhere after the 4500'th result, the client gets disconnected.

any ideas?
 
This maybe is a bug but maybe is a security feature.


First thing I would do is check the logs of the server, you might find useful information there.


dani++
 
this was in my error.log
looks like the process crashes :\
Sep 14 14:05:21 darklotus crashdump: Couldn't find or create: /Users/Shared/Library/Logs/CrashReporter

Sep 14 14:05:21 darklotus crashdump: Failed to open /Library/Logs/CrashReporter/pure-ftpd.crash.log errno: 13

Sep 14 14:05:21 darklotus crashdump: Unable to write crash report to /Library/Logs/CrashReporter/pure-ftpd.crash.log for uid: 21 Date/Time: 2002-09-14 14:05:21 -0400 OS Version: 10.2 (Build 6C115) Host: darklotus Command: pure-ftpd PID: 8343 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0xbff7fff8 Thread 0 Crashed: #0 0x90005d84 in cthread_set_errno_self #1 0x90005d3c in cerror #2 0x9000c9f0 in tzload #3 0x9000c9f0 in tzload #4 0x9006bfec in gmtload #5 0x9000c8a0 in tzsetwall #6 0x9000c580 in localtime #7 0x0000d5f0 in listfile (ls.c:248) #8 0x0000e1c4 in listdir (ls.c:645) #9 0x0000e318 in listdir (ls.c:691) #10 0x0000e318 in listdir (ls.c:691) #11 0x0000e318 in listdir (ls.c:691) #12 0x0000eaf0 in donlist (ls.c:879) #13 0x00010ca0 in parser (ftp_parser.c:425) #14 0x0000a30c in doit (ftpd.c:4220) #15 0x0000bd64 in main (ftpd.c:5093) #16 0x00001ec0 in _start #17 0x00001cf0 in start PPC Thread State: srr0: 0x9000

Sep 14 14:05:22 darklotus /usr/libexec/crashreporterd: crashdump exited with status: 1
 
Check out that the files and/or directories the ftpd is looking for actually exist and are writable by the actual ftpd process.

On the other hand, the dump tells you it crashes on something like 'listdir'... You could also check out the source of the ftpd to see if it has a hardcoded limit on what it returns (it surely does).


dani++
 
Back
Top