Bug 1351458

Summary: [vsftpd] 500 OOPS: 421 Service not available, when ls a dir that include more than 31 files
Product: [Fedora] Fedora Reporter: JianHong Yin <jiyin>
Component: vsftpdAssignee: Martin Sehnoutka <msehnout>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 24CC: jaskalnik, jiyin, mnagy, mosvald, msehnout
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: vsftpd-3.0.3-2.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-11 08:48:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description JianHong Yin 2016-06-30 06:48:12 UTC
Description of problem:
[vsftpd] 500 OOPS: 421 Service not available, when ls a dir that include more than 31 files

Version-Release number of selected component (if applicable):
Fedora 24
vsftpd-3.0.2-15.fc24.x86_64

How reproducible:
always in my host

Steps to Reproduce:
Terminal1
1. start vsftpd service
2. mkdir $ftphome/test
3. touch $ftphome/test/{1..31}

Terminal2
4. ftp localhost  localhost # or ftp $IP from another host
ls test  # success

Terminal1
5. touch $ftphome/test/32

Terminal2
ls test  # get 500 OOPS:  fail


Actual results:
ftp> ls test
227 Entering Passive Mode (10,66,13,9,53,232).
150 Here comes the directory listing.
-rw-r--r--    1 0        0               0 Jun 30 06:27 1
-rw-r--r--    1 0        0               0 Jun 30 06:27 10
-rw-r--r--    1 0        0               0 Jun 30 06:27 11
-rw-r--r--    1 0        0               0 Jun 30 06:27 12
-rw-r--r--    1 0        0               0 Jun 30 06:27 13
-rw-r--r--    1 0        0               0 Jun 30 06:27 14
-rw-r--r--    1 0        0               0 Jun 30 06:27 15
-rw-r--r--    1 0        0               0 Jun 30 06:27 16
-rw-r--r--    1 0        0               0 Jun 30 06:27 17
-rw-r--r--    1 0        0               0 Jun 30 06:27 18
-rw-r--r--    1 0        0               0 Jun 30 06:27 19
-rw-r--r--    1 0        0               0 Jun 30 06:27 2
-rw-r--r--    1 0        0               0 Jun 30 06:27 20
-rw-r--r--    1 0        0               0 Jun 30 06:27 21
-rw-r--r--    1 0        0               0 Jun 30 06:27 22
-rw-r--r--    1 0        0               0 Jun 30 06:27 23
-rw-r--r--    1 0        0               0 Jun 30 06:27 24
-rw-r--r--    1 0        0               0 Jun 30 06:27 25
-rw-r--r--    1 0        0               0 Jun 30 06:27 26
-rw-r--r--    1 0        0               0 Jun 30 06:27 27
-rw-r--r--    1 0        0               0 Jun 30 06:27 28
-rw-r--r--    1 0        0               0 Jun 30 06:27 29
-rw-r--r--    1 0        0               0 Jun 30 06:27 3
-rw-r--r--    1 0        0               0 Jun 30 06:27 30
-rw-r--r--    1 0        0               0 Jun 30 06:27 31
-rw-r--r--    1 0        0               0 Jun 30 06:27 4
-rw-r--r--    1 0        0               0 Jun 30 06:27 5
-rw-r--r--    1 0        0               0 Jun 30 06:27 6
-rw-r--r--    1 0        0               0 Jun 30 06:27 7
-rw-r--r--    1 0        0               0 Jun 30 06:27 8
-rw-r--r--    1 0        0               0 Jun 30 06:27 9
226 Directory send OK.
ftp> ls test
227 Entering Passive Mode (10,66,13,9,43,2).
150 Here comes the directory listing.
500 OOPS: 421 Service not available, remote server has closed connection
ftp> by
[yjh@dhcp-12-116 share]$ ftp  localhost
Trying ::1...
Connected to localhost (::1).
220 (vsFTPd 3.0.2)
Name (localhost:yjh): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd share
250 Directory successfully changed.
ftp> ls test
229 Entering Extended Passive Mode (|||7412|).
150 Here comes the directory listing.
500 OOPS: 421 Service not available, remote server has closed connection


Expected results:
no 500 OOPS: fail

Additional info:
  use firefox as client, get similar result: can not get file list

Comment 1 Martin Sehnoutka 2016-07-01 07:17:41 UTC
You have old version of vsftpd package. Please update your system and try again.

Comment 2 JianHong Yin 2016-07-05 06:31:58 UTC
(In reply to Martin Sehnoutka from comment #1)
> You have old version of vsftpd package. Please update your system and try
> again.

I have upgrade the system(Fedora 24). the vsftpd package has been the latest version in F24.

Comment 3 JianHong Yin 2016-07-05 07:06:28 UTC
[yjh@dhcp-12-116 share]$ rpm -q vsftpd
vsftpd-3.0.2-15.fc24.x86_64
[yjh@dhcp-12-116 share]$ LANG=C sudo dnf update vsftpd
Last metadata expiration check: 2:14:15 ago on Tue Jul  5 12:35:00 2016.
Dependencies resolved.
Nothing to do.
Complete!

Comment 4 JianHong Yin 2016-07-05 07:19:47 UTC
According https://apps.fedoraproject.org/packages/vsftpd
  The default version is vsftpd-3.0.2-15.fc24  in F24


* And vsftpd-3.0.2-16.el7 works fine

Comment 5 JianHong Yin 2016-07-11 08:48:11 UTC
The package in https://apps.fedoraproject.org/packages/vsftpd has updated to 3.0.3-2.fc24

Test ok. close.