LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-03-2014, 10:40 AM   #1
john.wythe@activant.com
Member
 
Registered: Nov 2009
Location: Burnaby BC
Posts: 77

Rep: Reputation: 1
VSFTPD problem when NCFTP client uses EPSV


I have a problem with NCFTP and NCFTPGET on one system, but not on another. It had been working fine, and now it is not.

The debugging shows that the EPSV command is timing out.

Anybody have a solution, or any ideas what the problem might be?
My thought is maybe the router that the failing system is behind is doing something with the EPSV command, or the vsftpd server is doing something based on the IP it is comming from. I just do not know what else to look at in either case to track this down.

TIA

P.S. There are a few other systems using ncftpget to access the server and they are also working fine. Each system is behind it's own unique router.

The firewalls and routers are setup for passive mode FTP.
On one system, FTP, NCFTP and NCFTPGET work fine.
On the other FTP works, but NCFTP and NCFTPGET fail.

The server is running VSFTPD version vsftpd-1.2.1-3E.16 on Red Hat Enterprise Linux ES release 3 (Taroon Update 9).

Both client systems are running Red Hat Enterprise Linux ES release 4 (Nahant Update 9) NCFTP is ncftp-3.0.3-6.

Both client systems have the same .ncftp/firewall and .ncftp/prefs_v3 files.
Both client systems have Selinux turned off.

I know the data port is getting opened and connection is getting through on both systems as I used "telnet {server ip} {data port}".
data port being the port shown in the debug info, and a connection is made.

Here is the vsftpd.conf file on the server:

# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
pasv_min_port=20000
pasv_max_port=20100

#pasv_address=65.39.140.14
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=(ftp.silksystems.com)
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
userlist_deny=NO
chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES

pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES

Here is the ncftpget output for both client systems:

Working:

220: (server.com)
Connected to server.com.
Cmd: USER user
331: Please specify the password.
Cmd: PASS xxxxxxxx
230: Login successful.
Cmd: PWD
257: "/"
Logged in to server.com as user.
Cmd: FEAT
211: Features:
MDTM
REST STREAM
SIZE
End
Cmd: HELP SITE
214: The following commands are recognized.
ABOR ACCT ALLO APPE CDUP CWD DELE EPRT EPSV FEAT HELP LIST MDTM MKD
MODE NLST NOOP OPTS PASS PASV PORT PWD QUIT REIN REST RETR RMD RNFR
RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
XPWD XRMD
Help OK.
Cmd: CLNT NcFTPGet 3.0.3
500: Unknown command.
Cmd: EPSV
229: Entering Extended Passive Mode (|||20007|)
Cmd: NLST /sagro/ord055/*.ord
150: Here comes the directory listing.
226: Directory send OK.
ncftpget /sagro/ord055/*.ord: no match.
Cmd: QUIT
221: Goodbye.

Failing:

220: (server.com)
Connected to server.com.
Cmd: USER user
331: Please specify the password.
Cmd: PASS xxxxxxxx
230: Login successful.
Cmd: PWD
257: "/"
Logged in to server.com as user.
Cmd: FEAT
211: Features:
MDTM
REST STREAM
SIZE
End
Cmd: HELP SITE
214: The following commands are recognized.
ABOR ACCT ALLO APPE CDUP CWD DELE EPRT EPSV FEAT HELP LIST MDTM MKD
MODE NLST NOOP OPTS PASS PASV PORT PWD QUIT REIN REST RETR RMD RNFR
RNTO SITE SIZE SMNT STAT STOR STOU STRU SYST TYPE USER XCUP XCWD XMKD
XPWD XRMD
Help OK.
Cmd: CLNT NcFTPGet 3.0.3
500: Unknown command.
Cmd: EPSV
229: Entering Extended Passive Mode (|||20007|)
Alarm clock

ncftp trace on working system:

09:46:59 Cmd: CLNT NcFTP 3.0.3 linux-x86
09:46:59 500: Unknown command.
09:47:10 > dir

09:47:10 Cmd: EPSV
09:47:10 229: Entering Extended Passive Mode (|||20008|)
09:47:10 Cmd: LIST
09:47:10 150: Here comes the directory listing.
09:47:10 226: Directory send OK.
09:47:10 Remote listing contents {

ncftp trace on failing system:

06:55:43 Cmd: CLNT NcFTP 3.0.3 linux-x86
06:55:43 500: Unknown command.
06:55:45 > dir

06:55:45 Cmd: EPSV
06:55:45 229: Entering Extended Passive Mode (|||20060|)
06:56:05 Caught signal 14, back at top.
 
Old 01-04-2014, 05:54 AM   #2
john.wythe@activant.com
Member
 
Registered: Nov 2009
Location: Burnaby BC
Posts: 77

Original Poster
Rep: Reputation: 1
Solved

I managed to resolve the issue by updating to ncftp-3.2.2-1.
FYI Both systems where 64 bit machines and where running the 32 bit version.
I loaded the 64 bit version which may have made a difference.
Both systems have IPV6 turned on.

ncftpget no longer tries to use EPSV.
 
  


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
[ncftp] how to delete oldest directory and file using ncftp commands booyeeka Linux - Newbie 3 08-17-2010 11:23 AM
ftp error: EPSV command not understood noir911 Linux - Server 1 10-24-2008 02:05 AM
pc1 connected to pc2 via rs232, ncftp problem swi3zy Linux - Networking 0 05-04-2006 02:26 PM
vsftpd client commands??? blizunt7 Linux - Networking 9 10-08-2004 03:15 PM
500 'EPSV': command not understood cccc Programming 0 07-04-2004 06:37 PM

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

All times are GMT -5. The time now is 12:23 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