FTP channel issue with some servers: 450 error

441 views
Skip to first unread message

BikeMike

unread,
Jul 10, 2009, 12:13:27 AM7/10/09
to Bots Open Source EDI Translator
This is actually an issue with server setup I think, and I don't know
how common it is. I only have the problem with one server out of more
than 10 I have tested.

When the folder on the server contains no files and Bots issues an
"ls" command, the server returns "450 No files found". Since numbers
beginning with 4 are classified as errors (in ftplib) then an
exception is returned and Bots reports a process error.

But this is not really an error. The server should not return the 450
code I don't think, but it's not my server and I can't change it.

I started trying to code around this, by modifying communication.py

# Some servers return 450 error if directory is empty - not a real
error so ignore it
try:
lijst = fnmatch.filter(self.session.nlst(),self.channeldict
['filename'])
except ftplib.error_temp:
print "ftp nlst error ignored"
else:
for fromfilename in lijst: #fetch messages from ftp-server.

This worked, but then I thought of an easier solution. I created an
empty file called "do not delete.txt" on the server. As long as you
don't use *.* as the filename to retrieve, it stays there, and the ls
command is always successful.

I'm not sure if you think a modification is the correct way to go for
this, or if anyone else has this problem?

Kind Regards
Mike

hjeb...@gmail.com

unread,
Jul 13, 2009, 11:05:33 AM7/13/09
to bots...@googlegroups.com
HI mike,

do you know which ftp-server they are using?

kind regards,
henk-jan

BikeMike

unread,
Jul 13, 2009, 7:17:40 PM7/13/09
to Bots Open Source EDI Translator
Hi henk-jan

The server response is...
220 ProFTPD 1.2.10 Server (ProFTPD Default Installation)

regards, Mike
Reply all
Reply to author
Forward
0 new messages