Getting MLSD listing via "Enter custom command..."?

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
cynebald
504 Command not implemented
Posts: 9
Joined: 2008-02-25 03:54

Getting MLSD listing via "Enter custom command..."?

#1 Post by cynebald » 2009-06-18 05:43

How can I get a MLSD listing via "Enter custom command..." (that is, a raw command)? If I type MLSD after connecting, I get:

503 Bad sequence of commands.

But if I type MLST, it works as expected. Also, note that MLSD works without issue when I'm normally browsing different directories (as is shown in the message log). It's only when I manually enter it, it fails.

The reason I want to accomplish this, though, is so I can use the command with the PHP ftp_raw function, so I don't have to use the ftp_rawlist function, which uses the FTP LIST command (not MLSD).

I'd appreciate any suggestions. :)

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Getting MLSD listing via "Enter custom command..."?

#2 Post by boco » 2009-06-18 07:07

You have to send a correctly formatted PORT or PASV command before MLSD. And your script must receive the data on the given port, then.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

cynebald
504 Command not implemented
Posts: 9
Joined: 2008-02-25 03:54

Re: Getting MLSD listing via "Enter custom command..."?

#3 Post by cynebald » 2009-06-18 08:21

What do you mean by "correctly formatted"?

I actually tried, in FileZilla Client, to first do PASV and then MLSD (separately in "Enter custom command..."), but got the following:

425 Can't open data connection.

Is it even possible to do MLSD via "Enter custom command..." in FileZilla and get the proper responce?

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Getting MLSD listing via "Enter custom command..."?

#4 Post by boco » 2009-06-18 09:10

When you issue the PASV command, the server responds with it's IP and a port. Read Network Configuration to learn about the proper calculation of the port. Then you must open a seperate connection to this port to receive the listing (after MLSD).
Is it even possible to do MLSD via "Enter custom command..." in FileZilla and get the proper responce?
No. You could probably do it with two Telnet sessions.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

User avatar
botg
Site Admin
Posts: 35562
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Getting MLSD listing via "Enter custom command..."?

#5 Post by botg » 2009-06-18 12:37

No. You could probably do it with two Telnet sessions.
I used that a bunch of times, works but no fun.

User avatar
boco
Contributor
Posts: 26935
Joined: 2006-05-01 03:28
Location: Germany

Re: Getting MLSD listing via "Enter custom command..."?

#6 Post by boco » 2009-06-19 05:56

Wait, we ought to have fun here? :mrgreen:
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

Post Reply