FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

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
kiltit
504 Command not implemented
Posts: 8
Joined: 2019-12-30 16:25
First name: kilt
Last name: it

FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#1 Post by kiltit » 2019-12-30 16:51

Hi,

I am the vsftpd server administrator, and since deploying vsftpd-3.0.2-25 on RedHat EL 7.7 in Azure, when I access using FileZilla client 3.46.3 I receive "Directory Listing Empty".
by contrast when accessing the same ftp account using windows command prompt/powershell ; or WinSCP or lftp the directory contents list OK.

I sporadically do get a listing in FileZilla, though more often than not if remains empty listing.
I have uploaded a single file in the directory within FileZilla and that did trigger a refresh including the uploaded file and the files already existing.
Upon deleting the uploaded file in the directory in the FZ window the subsequent refresh again showed an empty listing.

I have tried both using passive and active FTP, the result is the same, generally no listing.

The status window just shows 'Retrieving directory listing of "/"...'
followed by 'Directory listing of "/" successful'
but I get these status messages whether the directory contents are actually listed or not.

I have advised clients to avoid using FZ to connect for the time being, but I don't think that is the best solution either for ourselves or the FileZilla product.

Is there something that needs to be done to make the directory listings successful and consistent, whether within the vsftpd config or the FZ client config?

kiltit
504 Command not implemented
Posts: 8
Joined: 2019-12-30 16:25
First name: kilt
Last name: it

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#2 Post by kiltit » 2019-12-31 11:05

Notably, I have observed the same experience with another server running vsftpd-3.0.2-25 hosted on RedHat 7.6, so I don't necessarily suspect this to be a bug in code but more likely some configuration setting somewhere.

However using the same configuration settings from one of our old servers running vsftpd-2.2.2 hosted on RedHat 6.5 works reliably when using FileZilla and the other ftp clients, so why doesn't the same configuration work now for Filezilla clients?

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

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#3 Post by botg » 2019-12-31 13:16

Are you using plain FTP or FTP over TLS?

In case you are using plain FTP, you can check using a network sniffer such as Wireshark on the client machine, what data the server has sent.

kiltit
504 Command not implemented
Posts: 8
Joined: 2019-12-30 16:25
First name: kilt
Last name: it

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#4 Post by kiltit » 2020-01-02 14:52

Hi botg, thanks for the response.

I have plain old unsecured FTP available, though FTPS is also available, so I connected using FileZilla unprotected to ascertain what differences I could determine.

I have run packet captures on both the existing host and the new host, and there are differences between to two, as you'd expect, however the packet captures when accessing the 'working' old server records 500 OOPS: 'vsf_sysutil_recv_peek', whereas the packet capture for the new server returns no ftp error codes but alas neither does the directory list return. Interestingly I can't see the actual directory list contents in either of the packet capture bytes, though they must be somewhere.

I don't intend pursuing the 500 OOPS issue on the existing server, on the basis that "if it ain't broke, don't fix it" basis, however I would like the new server return the directory listing as is expected.

It would be useful if anybody else has experienced this issue to add in their observations here, ideally with any solutions found...

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

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#5 Post by botg » 2020-01-03 09:30

Looks like a server-side issue, not necessarily in the server software itself, but in its environment. Cloud networking infrastructure can be very unreliable.

kiltit
504 Command not implemented
Posts: 8
Joined: 2019-12-30 16:25
First name: kilt
Last name: it

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#6 Post by kiltit » 2020-01-03 11:20

Hi botg,

solved, I think.

I'm not sure what the cause of the issue was, I deployed another VM locally in VMware workstation and started from basic server vsftpd config that worked as expected, then replaced the azure server config with it, and filezilla now works as expected.
I'm now working through retests for all accounts/client s/w to make sure the new config hasn't unintentionally broken anything that worked before.

All being well with the retests, I'll do a compare between the new working config and the previously non working config and will post here what the anomaly was found to be.

Thanks for your responses anyway.

best regards,

kiltit

kiltit
504 Command not implemented
Posts: 8
Joined: 2019-12-30 16:25
First name: kilt
Last name: it

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#7 Post by kiltit » 2020-01-15 12:01

Hi,

this seems periodically sporadic (seldomly the dir list appeared with FZ), but mostly directory contents are not returned when connecting using FileZilla, I have had a call logged with RedHat since my last update to investigate and advise.
RedHat tech supp have validated the server configuration.
I have connected successfully using 'other ftp clients' and obtain the directory listings successfully.
Specifically when connecting using the FileZilla client, packet captures have been analysed and RedHat report (in bold) the following findings for the FileZilla sessions:-

"There is a single instance at 15:05:49, stream 12, 10.130.32.60:59844 → 10.88.254.44:21 which is different. Here the Client connects but then does not send any type of directory listing command after the FTP login. It simply sits idle for 12 seconds and then disconnects at the TCP level."

<...>

"- The odd man out is stream 12.
- The Client logs in but at no point does it send a PORT, PASV, or any kind of directly listing command.
- After ~12 second of idle time, the Client closes the connection at the TCP level with a FIN.
- No sign of a network issue; the Client simply never sent any command that required a data connection."
[stream 12 was the packet capture for FileZilla client, other streams were given to RedHat for comparison and behaved as expected]

<...>

"- Comparing the flow of FTP commands in the immediately prior stream 10 to the idle stream 12.
- Everything is the same up until the PWD command.
- After the successful PWD command in the working stream 10, the Client continues on with TYPE, PORT, and then LIST commands.
- After the successful PWD command in the ineffective stream 12, the Client sits idle and then closes the connection at the TCP level."

<...>

"Conclusion:
-----------
- In all the instances where the Client sent an FTP command for a directory listing such as NLST or LIST, the expected data connection is opened and a listing sent (a bit of assumption taken here with the TLS connections but the basic pattern/flow of data looks good).
- There is one connection at 15:05:49 where the Client simply never send any directory listing command. If this corresponds to the time of the issue then the issue is with the Client application.
- Note the pcap data does not contain any bits which allow us to identify the client application as any specific program (filezilla, winscp, etc)."



If you could please again investigate FileZilla client, I'm currently using 3.46.3 on Windows 10.
Specifically I can provide FZ tech staff with url and credentials via PM if they wish to try.

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

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#8 Post by botg » 2020-01-15 23:21

If you see no activity server-side, what is at that very same moment written in the client-side log? Make sure to synchronize your clocks for usable timestamps.

kiltit
504 Command not implemented
Posts: 8
Joined: 2019-12-30 16:25
First name: kilt
Last name: it

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#9 Post by kiltit » 2020-01-16 10:00

Hi botg,

RedHat analysed packet captures both client and server at the same time, no directory list command was issued by the client,

thanks,

kiltit

kiltit
504 Command not implemented
Posts: 8
Joined: 2019-12-30 16:25
First name: kilt
Last name: it

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#10 Post by kiltit » 2020-01-16 15:44

hold that thought, despite RedHat tech supp advising the dir list request was not sent, I found a server config optimisation that appears to have resolved the 'directory listing empty' issue from on-prem, will test public access tomorrow.

kiltit
504 Command not implemented
Posts: 8
Joined: 2019-12-30 16:25
First name: kilt
Last name: it

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#11 Post by kiltit » 2020-01-20 10:23

Hi botg,

it turns out this was (as you rightly suspected) a server vsftpd misconfiguration, the cause was the 'text_userdb_names=YES' statement.
I have deleted that statement so it now defaults to NO.

now loading the page returns in seconds instead of minutes in a browser.
With the value incorrect, the command prompt ftp client just waited until a response was eventually returned, winscp worked eventually after a retry or two, and FileZilla as a say just failed to connect or displayed empty directory listing, depending on which ftp account was logged into and how much data there was to return, so it's just down to error handling as to what experience you have (so FileZilla is not wrong, just different) and what time-outs you hit.

I'm surprised just how much of an overhead the 'text userdb names' setting has on performance, I'll have to remember not to use that again.

thanks for your responses in helping me to bottom this one out.

best regards,

kiltit

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

Re: FileZilla client "Empty Directory Listing" accessing vsftpd on RedHat

#12 Post by botg » 2020-01-20 10:52

Is your server system by chance using ldap to map IDs to user/group names?

A security feature in vsftp disallows certain child processes to access certain things, e.g. network access in the process that does directory listings. This is mentioned in the vsftp FAQ, try setting isolate_network to no.

Post Reply