LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   VSFTPD not in /etc/init.d (https://www.linuxquestions.org/questions/linux-newbie-8/vsftpd-not-in-etc-init-d-736735/)

Tullio 06-30-2009 01:24 PM

VSFTPD not in /etc/init.d
 
Hi,

Not only I'm new to this forum but I'm also new to Linux (although I've been doing more and more linux work lately). I've recently installed SLES 9 (at GA level, not SP4) running on the mainframe under z/VM. I need to have an FTP server up and running. I made the necessary changes to the vsftpd.conf file but when I was going to bounce the server for the changes to take effect, I realized it was not running to begin with. So I tried to issue the "service vsftpd start" command but cmd "service" was not available. I did some research and found out that I could go to "/etc/init.d" and start the vsftpd service from there. The thing is, there is no vsftpd file in /etc/init.d on this system. I went to yast and verified that vsftpd was installed. I also issued command "rpm -q vsftpd" and the result was vsftpd-1.2.1-69.3 (I believe this means that vsftpd is indeed installed). My question is, what am I missing? How come the vsftpd.conf file exists, the command "vsftpd" also exists in /usr/sbin but there is no vsftpd in /etc.init.d? How can I get vsftpd started?

Any help is very much appreciated.

Thanks,

Tullio.

nuwen52 06-30-2009 01:39 PM

Try looking in /etc/xinetd.d Many services are started from xinetd instead of being actual daemons. xinetd watches whatever ports you tell it to watch, and spawns the correct program to deal with it.

Oh, Welcome to LQ.

Tullio 06-30-2009 03:24 PM

Thanks for the info., Nuwen. There is a vsftpd file in /etc/xinetd.d that looks like this:

# default: off
# description:
# 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
protocol = tcp
wait = no
user = root
server = /usr/sbin/vsftpd
# server_args =
# log_on_success += DURATION USERID
# log_on_failure += USERID
# nice = 10
disable = no
}

Now, what do I do with it? I tried to simply type vsftpd from within this directory and received the following error:

lnx9s1:/etc/xinetd.d # vsftpd
500 OOPS: could not bind listening IPv4 socket

The FTP server is running because I was able to issue the FTP command but I can not figure out how to stop/start it.

Thanks again.

nuwen52 06-30-2009 03:39 PM

Ok, here's the short version of what xinetd is. It's a wrapper daemon (but more powerful). You register the protocols, ports and programs with it. And, it starts watching the ports. In this case, it watches 21 (ftp). When it gets an incoming request for port 21, it launches the proper program (vsftpd in this case) and passes the connection off to it. The benefit is that you don't have to have a bunch of daemon programs watching ports all the time. xinetd does the watching and only spawns the program when it receives a request.

The short answer to your question is, you don't start or stop the vsftpd, xinetd does it for you. Most daemon programs can also be run outside of xinetd, but I don't know about vsftpd. Since there's no init file in init.d, I would assume that the preferred way is to run it through xinetd (which is a good option). Proftpd is the one I know more of, and it can be run either way.

Oh, if you do want to disable ftpd for a while (or just make xinetd stop listening so you can manually start an ftpd), change the disable=no to yes and restart xinetd.

I need to read better. The bind error you got was because xinetd was already listening to port 21. Only one program can bind to a specific port at any one time.

chrism01 07-01-2009 01:04 AM

Running vsftpd from xinetd is fine. You could run it separately, but normally the only need for that is if vsftpd is going to be very busy and thus slow down xinetd noticeably.


All times are GMT -5. The time now is 08:14 AM.