LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Making vsftpd work on Slackware13... (https://www.linuxquestions.org/questions/slackware-14/making-vsftpd-work-on-slackware13-876215/)

Hangdog42 05-09-2011 09:01 AM

Quote:

Originally Posted by jm_5
I am running all commands as root, so iptables definitely isn't installed. Do I need it?

Technically, no. But without it you can't put in a firewall. However, it also means that you don't currently have a firewall, which rules out one variable.

Looking at your netstat output, it is clear that inetd is listening on port 21. It is also clear that when you try to connect, vsftpd isn't starting. When I connect to my server, vsftpd shows up in the netstat output, even before I complete the login. So this brings up the question, is the problem vsftpd (it isn't starting properly), inetd (it isn't communicating with vsftpd properly) or something outside of your control (like the networking environment of your hosting service).

As an experiment, try taking inetd out of the equation for now and run vsftpd as a standalone service. I think to do that you need to recomment the vsftpd line in inetd.conf, then in vsftpd.conf, uncomment the LISTEN directive and then start vsftpd. Just for giggles, you might run vsftpd from a screen session so you can leave it running in a console and maybe errors will show up there. Once you've got that done, netstat should show vsftpd listening. If it is, try connecting and see what happens.

jm_5 05-10-2011 03:45 PM

Thanks Hangdog.

I've tried that and changed the listen directive so it runs standalone.

Also worked through the following link to check I've done everything properly:

ftp://vsftpd.beasts.org/users/cevans...-2.3.4/INSTALL

When I try and run it standalone it seems to run, but just goes to a blank flashing cursor and basically crashes - ie it doesn't come up with a prompt, and I have to reboot the server from the vps console to get back to the shell prompt.

Try it out with a remote anonymous FTP client though and it seeems to work and connect ok. Trouble is, I can't do anything else while it's running...

Slowly getting there!


Many thanks,


John

jm_5 05-10-2011 04:31 PM

I've kind of solved the above by adding the following line:

Code:

/usr/sbin/vsftpd &
to /etc/rc.d/rc.local

So it starts in standalone mode when the server boots, and that seems to work ok.

Still not sure why it won't work with inetd though...

Hangdog42 05-10-2011 04:41 PM

Quote:

Originally Posted by jm_5
Still not sure why it won't work with inetd though...

That is a really good question. The fact that vsftpd works in standalone means that inetd is the problem. And it also probably means that the cut-down Slackware install missed something that inetd needs. You might try ldd /usr/sbin/inetd and see if a library is missing.

Quote:

Originally Posted by jm_5
When I try and run it standalone it seems to run, but just goes to a blank flashing cursor and basically crashes - ie it doesn't come up with a prompt, and I have to reboot the server from the vps console to get back to the shell prompt.

Just a couple of things in case you run into something like this in the future. Using the ALT plus a function key (F1 through F6) will bring up one of the other active shells. If you're logging in through SSH, you can usually/always start another SSH session (unless the hosting service has restricted it). If they have, then you absolutely need to check out the screen command. Screen is one of the most useful command line tools there is. If you had started vsftpd from a screen session, you could have simply detached and gotten back to a prompt.

jm_5 05-10-2011 06:18 PM

Thanks Hangdog!

Never had any joy before by trying to reconnect with SSH, just end up where I was before.

Screen command looks very interesting though - will have a read through that - many thanks!

Code:

sh-3.1# ldd /usr/sbin/inetd
        linux-gate.so.1 =>  (0xffffe000)
        libc.so.6 => /lib/libc.so.6 (0xf75cc000)
        /lib/ld-linux.so.2 (0xf7735000)

Those dependencies for inetd all seem to be present. A mystery!


Many thanks,


John

jm_5 05-11-2011 01:57 PM

Thanks Hangdog, had a little play with Screen today - it's really useful!

Many thanks for pointing it out to me!


John

Hangdog42 05-11-2011 03:05 PM

Yeah, screen is one of those tools that once you start using it, you wonder how you managed without it. My ISP is a touch on the unreliable side (Hi Comcrap!) so whenever I'm working remotely one of the first things I do is start a screen session or two. That way if someone in the network room trips over the power cord and brings down the Internet, I don't lose anything. I just log in later and re-attach to the session.

Wish I had a decent answer as to why inetd was behaving so funky. That one has me stumped. I'm glad you got vsftp working though.

jm_5 05-12-2011 03:04 PM

Thanks Hangdog, yeah Screen is a really handy tool.

It's a bit of a mystery why vsftpd won't work with inetd - it would be nice to use it with inetd, as I think there is slightly less overhead running it that way, but that's a minor issue, it doesn't matter, the main thing is to have got it working at all!

Thanks for all your help - I'd have been totally stuck without your helpful suggestions and insight, and was about ready to give up on it altogether.

Thanks again,


John


All times are GMT -5. The time now is 12:26 AM.