Click to See Complete Forum and Search --> : Glaring omission in the pure-ftpd documentation or me just being extremely thick?


Stephen Philbin
12-14-2004, 09:37 AM
Ok. So I gave up on another FTP server someone recomended to be because of the number of security holes in it that had no explanation of how to patch over and went back to pure-ftpd and decided to use it with no extras because it can't find files I gave explicit paths to on my system for some reason.

So anyway, I config and compile the server and get it up and running with the options I wanted. I try to log in and get told the server is refusing to listen on the local IP address at which it is installed and instead insists on listening only to the address which is already occupied by one of my routers. So I went back to my documentation and found the switch I didn't spot. Only trouble is, I can't use it because I can't stop the server.

With all other server documentation I've ever seen, one of the first things documented (after the ./configure switches, options, FAQ and general tips) is how to stop and start the server. The only thing mentioned in the documentation for pure-ftpd though is how to start it. I've read as much of the relevant documentation as I could find, but I can't find the comand to shut the damned thing down anywhere.

So now I got a misbehaving FTP server that I can't tell to behave because I can't stop it to give it the proper start switches. >_<

Help anyone? Anyone else use the little Sh** and know how to shut it down?

ray326
12-15-2004, 12:49 AM
What about kill?

NogDog
12-15-2004, 01:06 AM
And if that doesn't work:

kill -9 <process_id>

Stephen Philbin
12-15-2004, 05:43 PM
Oh great. Thanks guys. I thought kill was to kill all but the core processes. I figured doing that would take the OS down to a state where I wouldn't have the knowledge to either shut down or bring everything back up again properly without me screwing something up. Just read a bit on kill now and by the looks of it, it would seem I can just give kill a pid number to kill? Hopefully so. That way I can just read up on how to list all the PID's so I can find the number I want and kill it. Seems a bit daft having to do that after using stuff like ./apachectl stop and ./mysqladmin -u root shutdown -p, but I suppose it gets the job done.

It will shut it down properly though won't it? Apache and my database tables (under the innodb engine) tend to grumble a bit (like crash recovery etc) when you shut down the OS without shutting down the servers first. From just an OS shutdown I noticed it uses kill all (main reason I shy'd away from kill), would that not be the reason for my servers having a grumble?.

NogDog
12-15-2004, 06:21 PM
A "properly constructed" *NIX application should be designed to respond to a "kill <its_proc_id>" command and clean up after itself before committing suicide. But if "kill <proc_id>" does not work, sending the -9 signal will kill it dead right then and there; but you may have voided the warranty, so to speak, as far as leaving bits of data around here or there that really should have been cleaned up by a nice application.

Anyway, you can find the IDs of running processes via the "ps" command, such as:

ps -e | grep pure-ftpd // shows proc-id of program pure-ftpd
ps -ef | grep nogdog // shows all processes owned by user nogdog (in long format)

Stephen Philbin
12-15-2004, 06:36 PM
Thou art a star... Thou art a star. ;)

NogDog
12-15-2004, 11:27 PM
Originally posted by Mr Herer
Thou art a star... Thou art a star. ;)
Nah, just a jack of all trades, master of none, with just enough knowledge in a lot of computer things to be dangerous. :)

Glad I could help in this case.

Stephen Philbin
12-16-2004, 01:26 PM
The kill worked. It shut down the server (for some reason I gotta do it twice though, I kill it once and it comes back with another pid. Kill the returning process by its new pid and it stays dead though. :/ )

Still can't convince the server to listen to the right local address though, even with the -S option to tell it to listen to an alternative address. It still insists on listening only to 192.168.1.1 when I need it to listen on another local address. :/

Anyone, by any fluke, know how to make it behave? I googled for the problem but found only one page that was a clear match for my problem. Only trouble is the page seemed thin on info even if I could manage to translate the German. :confused: :(