LinuxQuestions.org
Visit Jeremy's Blog.
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-11-2016, 10:48 AM   #1
ankushkool
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Rep: Reputation: 0
Question vsftpd issue: Transfer done (but failed to open directory)


I'm trying to configure vsftpd. I am facing the issue when trying to ftp into CentOS 6.5 from Windows 10 cmd. It works fine if I use a application like WinSCP. I tried all suggestions listed in this forum including disabling SELINUX, still not working! Below is the message I get.


Quote:
ftp> ls /tmp/
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
226 Transfer done (but failed to open directory).
vsftpd config:
Quote:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/xferlog
xferlog_std_format=YES
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
iptables:
Quote:
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p tcp -m tcp --dport 21 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 20 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --sport 1024:65535 --dport 20:65535 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A INPUT -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -p tcp -m tcp --dport 21 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 20 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 1024:65535 --dport 20:65535 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
COMMIT
Would really appreciate if someone can help. Thanks in advance.
 
Old 01-11-2016, 11:55 AM   #2
PastulioLive
Member
 
Registered: Nov 2014
Posts: 39

Rep: Reputation: Disabled
Hello ankushkool,

How are you connecting to the FTP server from both applications? What user account is being used?

If you use WinSCP, chances are that you are using SCP instead of FTP.
SCP uses SSH and will have permission to all the files that user account has access to on the machine.

Your FTP configuration however is creating a jail in the logged in users homedirectory (which I assume does nog include /tmp).

Can you post the output of the FTP ls command when you are logged in from Windows 10 cmd?
 
  


Reply

Tags
ftp, selinux, vsftpd



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
[SOLVED] Failed to open directory for writing --VSFTPD ubuntu 10.04 lucid sanjay87 Linux - Server 1 04-19-2014 10:58 AM
FTP error 226 transfer done <but failed to open directory> sagar alias jacky Linux - Server 1 02-01-2014 01:38 PM
[SOLVED] vsftpd Error: Failed to retrieve directory listing jensge994 Linux - Server 4 07-06-2013 05:50 AM
create directory failed in vsftpd djunaedi Linux - Newbie 6 10-20-2009 03:44 AM
VSFTPD Directory Failed to open dwpondscum Linux - Wireless Networking 1 08-18-2005 06:28 PM

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

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