LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ftp failure - IPv4 listening (https://www.linuxquestions.org/questions/linux-networking-3/ftp-failure-ipv4-listening-766800/)

forum_user 11-04-2009 08:33 AM

ftp failure - IPv4 listening
 
Hi all,

Trying to ftp a Suse linux machine , I got the following error
Connecting to: 199.42.54.111 port: 21.
500 OOPS: could not bind listening IPv4 socket

inside /etc/vsftpd.conf, i checked the following:


listen=YES
listen_port=21
#listen_ipv6=YES


I tried to start the daemon vsftpd , I got the error

clerity-demo:~ # /etc/xinetd.d/vsftpd restart
service: no such service ftp
/etc/xinetd.d/vsftpd: line 8: socket_type: command not found
/etc/xinetd.d/vsftpd: line 9: wait: `=': not a pid or valid job spec
/etc/xinetd.d/vsftpd: line 9: wait: `no': not a pid or valid job spec
/etc/xinetd.d/vsftpd: line 10: user: command not found
/etc/xinetd.d/vsftpd: line 11: server: command not found
nice: =: No such file or directory
disable: Operation failed: client-error-not-found


I don't understand the reason of this command failure
Here is the content of /etc/xinetd.d/vsftpd, I modified it at all:

clerity-demo:~ # cat /etc/xinetd.d/vsftpd
# default: on
# description:s
# The vsftpd FTP server serves FTP connections. It uses
# normal, unencrypted usernames and passwords for authentication.
# vsftpd is designed to be secure.
service ftp
{
socket_type = stream
wait = no
user = root
server = /usr/local/sbin/vsftpd
# server_args =
# log_on_success += DURATION USERID
# log_on_failure += USERID
nice = 10
disable = no
}


Please advise ..
Yours,

Eman

ammorais 11-04-2009 08:56 AM

If you are trying to initiate vsftpd trough xinetd you have to change listen=YES to listen=NO on vsftpd.conf.

Also if you are trying to use vsftpd trough xinetd then "/etc/xinetd.d/vsftpd restart" does not make sense. Restart the xinetd service instead.

Also add this line to /etc/xinetd.d/vsftpd

Code:

service ftp
{
socket_type = stream
wait = no
user = root
server = /usr/local/sbin/vsftpd
# server_args =
# log_on_success += DURATION USERID
# log_on_failure += USERID
nice = 10
disable = no

## Add this line
server_args    = /etc/vsftpd.conf #The location of vsftpd.conf
}

On the other hand If you wan to configure vsftpd without xinetd. simple change the "disable = no" to "disable = yes" on /etc/xinetd.d/vsftpd and restart the vsftpd service.
PS: in the last scenario also restart the xinetd service.

forum_user 11-06-2009 06:50 AM

Thanks a lot for your Reply
both ftp and sftp are working well now

But it workrd with and without adding the line
server_args = /etc/vsftpd.conf #The location of vsftpd.conf

was is added just to ensure reading the vsftpd.conf file
Your reply was vey useful to me anyway

Thanks again

Eman

ammorais 11-06-2009 10:25 AM

Code:

was is added just to ensure reading the vsftpd.conf file
Yes. It was added just to make sure. Some times the packages are compiled with different options from distro to distro.

I'm glad It worked.


All times are GMT -5. The time now is 07:28 PM.