LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can not connect ftp server (https://www.linuxquestions.org/questions/linux-newbie-8/can-not-connect-ftp-server-4175532750/)

byran cheung 02-02-2015 01:47 AM

can not connect ftp server
 
I have installed vsftp to the server , the status is running now , but when use the command "ftp localhost" , it pops the "421 Service not available." , would advise what is wrong ? thanks

bash-3.2# /etc/rc.d/init.d/vsftpd status
vsftpd (pid 580) is running...
bash-3.2# ps -ef |grep vsftpd
root 580 1 0 15:44 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root 607 467 0 15:45 pts/0 00:00:00 grep vsftpd
bash-3.2# ftp localhost
Connected to localhost (127.0.0.1).
421 Service not available.

byran cheung 02-02-2015 02:32 AM

the telnet localhost is also not work , would advise what is the problem ? thanks

telnet: connect to address 127.0.0.1: Connection refused


I also installed proftpd , still have the same error msg.

byran cheung 02-03-2015 12:30 AM

is it because the server do not allow local user login ? thanks

chrism01 02-03-2015 03:52 AM

Try these 2 cmds
Code:

netstat -tanp

iptables -nvL


byran cheung 02-03-2015 07:43 AM

thanks reply , the below is the output , would advise what can I do ? thanks

bash-3.2# netstat -tanp |grep ftp

tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 3205/vsftpd
bash-3.2# ps -ef |grep ftp
root 3205 1 0 Feb02 ? 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root 6075 5626 0 21:35 pts/0 00:00:00 grep ftp


bash-3.2# /sbin/iptables -nvL

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
bash-3.2# /sbin/chkconfig --list |grep ip
all iptables are off

byran cheung 02-03-2015 07:14 PM

it seems not not connect with localhost , it is OK to connect from remote server , is there any setting that disallow local connect ? thanks

chrism01 02-04-2015 01:46 AM

VSFTPD comes with a plethora of cfg options - have a read of this https://security.appspot.com/vsftpd/vsftpd_conf.html
I expect the default is probably set not to actually allow cxn from localhost; its pretty redundant after all; much easier & quicker to 'cp' files around.

Also when posting code/data/cli sessions, please use code tags https://www.linuxquestions.org/quest...o=bbcode#code; it maintains proper layout - much easier to read.


All times are GMT -5. The time now is 02:44 PM.