--- ftp.pike Mon Feb 11 16:57:15 2002 +++ /usr/local/caudium/server/protocols/ftp.pike Sun Mar 24 20:23:32 2002 @@ -109,7 +109,7 @@ // line //#define DISABLE_MLST_MLSD -//#define FTP2_DEBUG +#define FTP2_DEBUG #define FTP2_XTRA_HELP ({ "Report any bugs to our bug database system : http://sourceforge.net/bugs/?group_id=8825." }) @@ -1729,7 +1729,7 @@ if (!file) { file = ([ "error":404 ]); } - send(550, ({ sprintf("'%s': %s: No such file or directory.", + send(550, ({ sprintf("'%s': %s: No such file or directory, or access denied", cmd, f) })); break; } @@ -3158,10 +3158,20 @@ session->file->full_path = args; send_MLSD_response(session->conf->find_dir_stat(args, session), session); } else { + session->file = ([ ]); if (st) { session->file->error = 405; + session->file->data = sprintf("%s: Method not allowed.", args); } - send_error("MLSD", args, session->file, session); + else + { + session->file->error = 550; + session->file->data = sprintf("%s: No such file or directory, or access denied.", args); + } + session->file->mode = "I"; + session->file->full_path = args; + connect_and_send(session->file, session); + //send_error("MLSD", args, session->file, session); } } #endif