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.
We just replaced a Windows 2K3 FTP server with an Ubuntu machine running vsftpd. Everything is working properly with the server except "ls" seems to work differently now than before. We post encrypted files named like so:
NAME.txt.pgp
While the server was W2K3, our clients were able to "ls N*.*.*" to retrieve the directory list. Now "ls N*.*.*" returns nothing but "ls N*.*" returns the correct list. I am hesitant to ask them to change their scripts because we were the ones initiating the server change.
Is there a setting I'm missing that could cause ls to work differently?
Looks like I have 2.3.2. Wonder if there's a version difference - the first part of the filename is always uppercase, so I do not think that is the trouble. Here's an example, I FTP-ed in from the server itself:
ftp> quote PASV
227 Entering Passive Mode (127,0,1,1,21,95).
ftp> ls N*
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rwxrw-rw- 1 1002 1001 0 Feb 28 17:41 NAME1.txt.pgp
-rwxrw-rw- 1 1002 1001 0 Feb 28 17:41 NAME2.txt.pgp
226 Directory send OK.
ftp> ls N*.*
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rwxrw-rw- 1 1002 1001 0 Feb 28 17:41 NAME1.txt.pgp
-rwxrw-rw- 1 1002 1001 0 Feb 28 17:41 NAME2.txt.pgp
226 Directory send OK.
ftp> ls N*.*.*
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
226 Directory send OK.
ftp>
Exciting eh?
pasv_enable=YES is set in vsftpd.conf. Samba wouldn't do anything funny to these files/directories, would it? Typically the files themselves are posted to the server by Windows users.
It's probably a bug, there have been several glob bugs in vsftpd over the years - there's a relatively recent one (June 2011) here listed in an RHN Errata Alert but I can't see the details to confirm.
Quote:
* The previous version of vsftpd did not interpret wildcards correctly. As a
result, applications relying on the wildcard functionality did not function
properly. With this update, supported wildcards ('*' and '?') work as expected.
(BZ#517292)
Thank you for checking the errata. I installed v. 2.3.5 but it had the same problem. Sigh. I'll try different software or (gasp!) ask the client to change their scripts.
Thank you for checking the errata. I installed v. 2.3.5 but it had the same problem. Sigh. I'll try different software or (gasp!) ask the client to change their scripts.
FYI, it works with vsftpd-2.3.4 but not with 2.3.5, I guess because of the elevated security measures used in the last version. It also works with pure-ftpd and proftpd.
I would suggest to go with pure-ftpd if you don't want to force your clients changing their scripts
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.