LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-28-2012, 04:50 PM   #1
Walter_Mellone
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Rep: Reputation: Disabled
Linux/vsftpd & client "ls" Command


Hello,

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?

Thanks in advance!
 
Old 02-28-2012, 05:16 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Works for me with vsftpd 2.3.4 .. could it be a case sensitivity issue ?
 
Old 02-28-2012, 05:46 PM   #3
Walter_Mellone
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
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*
200 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.
 
Old 02-28-2012, 06:11 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Wierd, is the ftp directory actually on a samba share or local disk (ext3 .. etc)?
 
Old 02-28-2012, 06:12 PM   #5
Walter_Mellone
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
The FTP directory is local, sorry, I should have specified that.
 
Old 02-28-2012, 07:22 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
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)
 
Old 03-01-2012, 10:22 AM   #7
Walter_Mellone
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-01-2012, 01:46 PM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by Walter_Mellone View Post
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

Regards
 
Old 03-01-2012, 05:08 PM   #9
Walter_Mellone
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Great, thank you, I will try that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd & "553 could not create file" steffentchr Linux - Server 8 06-28-2012 01:52 PM
[SOLVED] vsFTPd: Cannot use "ls" outside firewall - client hangs. arashi256 Linux - Server 4 01-13-2010 04:15 AM
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration