VSFTPD - Cannot download files when directory listing is disabled
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Anything with Penguins, Devils, or Geckos
Posts: 9
Rep:
VSFTPD - Cannot download files when directory listing is disabled
I am trying to setup a 'blind' server to use for customers downloading beta level code or fixes from our support team. I have configured the server with multiple options, but as long as I leave the ability to list the directories, everything works fine. As soon as I disable the directory listing, uploads still function with no issue, but downloads cease to function. This is the error message I get when I try to download files with command line ftp when the server is blind :
Does anyone know if this is a design choice/limitation of vsftpd? (Also as a side note, does anyone know what character to use for carriage returns in the vsftpd login message?)
Currently I am running :
vsftpd: version 2.2.2
vsftpd-2.2.2-11.el6_4.1.x86_64
This is the CentOS 6 Update 5 pre-packaged version. Does anyone know if this is fixed in a newer release?
Last edited by YortheHunter; 02-10-2015 at 07:15 AM.
Reason: forgot to add vsftpd version
Distribution: Anything with Penguins, Devils, or Geckos
Posts: 9
Original Poster
Rep:
Apologies for the <code> tags
Sorry about the <code> tags, I thought this forum allowed them to be used for formatting purposes, and I was trying to keep the logs and config file easily separated
Distribution: Anything with Penguins, Devils, or Geckos
Posts: 9
Original Poster
Rep:
Quote:
Originally Posted by YortheHunter
Sorry about the <code> tags, I thought this forum allowed them to be used for formatting purposes, and I was trying to keep the logs and config file easily separated
Distribution: Anything with Penguins, Devils, or Geckos
Posts: 9
Original Poster
Rep:
Quote:
Originally Posted by bathory
Regarding your main problem, using "dirlist_enable=NO" doesn't block file downloading
Thanks for the reply bathory, but if it doens't block file downloads, then why am I able to download the files when I have directory listing enabled, but by changing nothing other than the dirlist option in my vsftpd.conf, my download ability is broken? From the logs it seemed that the file downloads could not execute without the NLST option being allowed (which I am guessing is what that option toggles), and when I use the cmds_allowed option, deny LIST (by not listing it), and allow NLST explicitly, it seems to work? Would this be a permissions issue somewhere?
I have a 'blind' upload directory with 300 permissions, and a 'blind' download directory with 500 permissions. I have played with changing these, but have not been able to curb the results other than the users being able to login to the ftp server or not since I have the users chrooted to those dirs.
Can you provide a little bit more explanation on your statement? (Where are you getting this information, what does that option do, and/or any other relevant details you feel like sharing)
=]
From the logs it seemed that the file downloads could not execute without the NLST option being allowed (which I am guessing is what that option toggles), and when I use the cmds_allowed option, deny LIST (by not listing it), and allow NLST explicitly, it seems to work? Would this be a permissions issue somewhere?
I guess it's your client, or you're doing something wrong. I see that you have a 5min gap before the connection timeouts. So the server waits for your input. Maybe you need to start a manual transfer from your client.
Quote:
Can you provide a little bit more explanation on your statement? (Where are you getting this information, what does that option do, and/or any other relevant details you feel like sharing)
I've tested this setup either from CLI and with filezilla (that uses LIST and not NLST) and it works as expected. Also I've searched a bit and didn't find anyone else having this problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.