Cannot get vsftpd and xinetd to play together
Well, I have spent most of the day trying to get vsftpd working. One problem after the other. I'll chalk it up to me being new to Linux and be happy that I have learned along the way. Unfortunately, still not working properly.
If I have no vsftpd in /etc/xinetd.d and reboot, I still see "Starting vsftpd for vsftpd" a few lines after xinetd is starting. I am not clear why the system is still trying to start vsftpd when it is not there? It seems random. One time it was running even without any vsftpd in /etc/xinetd.d and another time, it was not. So then I attempt t[root@sforsgren-linux-01 sforsgren]# /etc/init.d/vsftpd status vsftpd dead but subsys locked [root@sforsgren-linux-01 sforsgren]# stream wait = no I then start it up manually after ensuring that I have the below set in /etc/vsftpd/vsftpd.conf. listen=YES tcp_wrappers=YES Due to the "vsftpd dead but subsys locked", I execute rm /var/lock/subsys/vsftpd [root@sforsgren-linux-01 init.d]# ./vsftpd start Starting vsftpd for vsftpd: [ OK ] [root@sforsgren-linux-01 init.d]# ps -ef | grep vsftpd root 2462 1 0 21:13 pts/0 00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf root 2468 2384 0 21:13 pts/0 00:00:00 grep vsftpd [root@sforsgren-linux-01 init.d]# So, looks good. Now for testing that it works.... ftp -u sforsgren-linux-01 (if I forget -u, I get Kerberos security warnings - not sure if there is a better way to avoid that either). Basic functionality seems to work fine locally. However, if I then go to my Windows XP box on my same internal network (Linksys router) and do ftp sforsgren-xp-01, I get back: ftp: connect: unknown error number. So, really I am not sure things are working right if I cannot ftp to the machine but can only use the ftp client on the same box with the ftp server. Hmm... Even though it still doesn't work from another machine, I get excited and decide that I want to start this up using xinetd so that I don't have to start it myself. I first remove: listen=YES tcp_wrappers=YES from /etc/vsftpd/vsftpd.conf and then create the /etc/xinetd.d/vsftpd file with the below. Now, I reboot and I still see the same message Starting vsftpd for vsftpd. However, when the machine is logged in and I do a ps, I don't see it running still. If I try to do a status, all I get is: [root@sforsgren-linux-01 sforsgren]# /etc/init.d/vsftpd status vsftpd dead but subsys locked [root@sforsgren-linux-01 sforsgren]# When I reboot, it says that it failed to shutdown vsftpd. I'm confused. I can start it manaully and it more or less works (but not from any other machine) but I cannot get it to start from xinetd.d and actually see the process running after a reboot. Oddly, sometimes when it is NOT in xinetd.d, it still is running without me having to start it after a reboot. In the most recent reboot, I had listen=YES back as I thought I would have to start it manually, and it still started automatically! My /etc/xinetd.d file looks like the below (when I have it there). # vsftpd is the secure FTP server. service ftp { disable = no socket_type = stream wait = no user = root server stream wait = no = /usr/sbin/vsftpd per_source = 5 instances = 200 banner_fail = /etc/vsftpd/busy_banner log_on_success += PID HOST DURATION log_on_failure += HOST } Thanks in advance for helping me to see the errors of my ways. |
with all that hassles - is the vsftpd ur using from the Red Hat installation tree?
|
vsftpd
Yes, this was installed with the Red Hat 9 installation. I have not installed anything on top of that. Just trying to get it configured to start at boot time and to work from another machine.
Thanks in advance for any ideas. |
well, vsftpd is xinetd controlled (by default). the vsftpd file should be present in /etc/xinetd.d/, provided that you have installed the xinetd and vsftpd packages.
for xinetd controlled services, all u need to do is: /sbin/chkconfig vsftpd on And make sure that xinetd is started at bootup (which is the default). U can verify that ur machine is offering ftp access by: netstat -l | grep ftp or by doing a local ftp connection. the ftp daemon only appears when an ftp connection is made so you won't find it (via ps or similar apps) when u don't have any ftp connections. hth |
Is that true? I see it running all the time. When I do a ps even with no connections, it is there. It is currently started as a service, not via xinetd.
I think I got this all working though. The problem was that I didn't realize it was getting started as a service and that seemed to conflict with the xinetd trying to start it. Thanks! |
ok ok. i got it all wrong. under RHL 9, vsftpd is now a stand-alone daemon and *NOT" an xinetd controlled service.
Just checked it with a new RHL 9 installation. sorry for the confusion. he he he and SForsgren - yay, glad that you have fixed it. |
Me too! Thanks very much for your pointers!
|
All times are GMT -5. The time now is 12:25 AM. |