Page 1 of 3

proFTPd doesn't want to login

Posted: 29 Jun 2010, 08:25
by DarkRanger
Hi guys,

I set up proFTPd on my Linux server. All went well for a long time and login and uploading happened no problem whatsoever. Now it suddenly does not want to log in. It comes to where it tries my username then says: Time out.

Any idea what it can be? I did install Postfix mail server a while back as well as some other things and the usual upgrade and update.

Thanks guys.

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 10:45
by Bladerunner
Scan with NMap, check if port 21 is open.

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 11:08
by DarkRanger
more details please... :P

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 11:17
by rustypup
does the server support anon login?

can you telnet the server on ports 20/21?

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 11:18
by Bladerunner
DarkRanger wrote:more details please... :P
Nmap Free Security Scanner For Network Exploration & Hacking

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 11:28
by DarkRanger
I do telnet with a command prompt right?

When I type telnet 41.72.132.170 it says telnet command not found

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 11:48
by Bladerunner
DarkRanger wrote:I do telnet with a command prompt right?

When I type telnet 41.72.132.170 it says telnet command not found
If you're using Windows you need to enable it in Control Panel, Add/Remove Windows Features or something similar.

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 11:53
by DarkRanger
C:\Users\xxxxxx>telnet 41.72.132.170:21
Connecting To 41.72.132.170:21...Could not open connection to the host, on port
23: Connect failed

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 11:54
by DarkRanger
does this for port 20 too.

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 12:02
by Bladerunner
Try Nmap now.

Re: proFTPd doesn't want to login

Posted: 29 Jun 2010, 12:24
by DarkRanger
Okay, I broke my FTP server now.

I played around with the settings a bit, and set it to run standalone. That didn't work so I changed it back to run in inetd mode.

Now when I try start the FTP server I get this error: Failed to start FTP server : You cannot start the server daemon when in inetd mode.

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 08:50
by rustypup
DarkRanger wrote:C:\Users\xxxxxx>telnet 41.72.132.170:21
:) the format you're after is

Code: Select all

telnet 41.72.132.170 20
&
telnet 41.72.132.170 21
ie, space between the IP and the target port.. .i know, let's break the universally accepted UNC standards but this is telnet...

for FTP, 20 is the data stream port, 21 is the instruction stream port.

installing nmap to determine if the FTP service is up is... interesting advice :/

Code: Select all

/etc/init.d/proftpd restart
how are you configuring the service, (webmin/CLI)?

proFTP bible

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 11:14
by DarkRanger
rustypup wrote:How are you configuring the service, (webmin/CLI)?

proFTP bible
configuring it with webmin.

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 11:18
by rustypup
you may need to dig into the relevant conf files to verify your changes have been applied...

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 11:31
by Bladerunner
rustypup wrote: installing nmap to determine if the FTP service is up is... interesting advice :/
To check if the port is open.

Some routers are set up to block telnet commands.

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 11:41
by DarkRanger
how do I completely remove proftpd with all its config files.

Telnet returns nothing on port 20 (says connection failed)
It does however make a black screen on port 21.

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 12:05
by rustypup
then the service is up on port 21... (this is where you would submit your ACTV/PASV/NAME/PWD/ASCII commands...)

does the service restart or throw the same error? in which case the service is in a mixed state, (the standalone session is bound to port 21 preventing inetd from initiating the service)

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 12:16
by DarkRanger
it throws the same error. When I click start server it says: Failed to start FTP server : You cannot start the server daemon when in inetd mode.

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 12:35
by rustypup

Code: Select all

fuser -n tcp 21
this should spit out the PID, (hopefully initialised by inetd), of the app serving that port...

what does the ftp line in your /etc/inetd.conf state?

you could also try restarting inetd itself...

Code: Select all

/etc/init.d/inetd restart
understand that inetd passively listens to a number of ports and only launches the necessary server daemon when it encounters a connection attempt...

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 12:48
by DarkRanger
rustypup wrote:

Code: Select all

fuser -n tcp 21
this should spit out the PID, (hopefully initialised by inetd), of the app serving that port...

what does the ftp line in your /etc/inetd.conf state?

you could also try restarting inetd itself...

Code: Select all

/etc/init.d/inetd restart
understand that inetd passively listens to a number of ports and only launches the necessary server daemon when it encounters a connection attempt...
the first bit of code only gives me:

Code: Select all

21/tcp 1830
FTP line:

Code: Select all

ftp     stream  tcp     nowait  root    /usr/sbin/tcpd /usr/sbin/proftpd
and the last command:

Code: Select all

root@ubuntu:~# /etc/init.d/inetd restart
-bash: /etc/init.d/inetd: No such file or directory

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 13:52
by rustypup
DarkRanger wrote:the first bit of code only gives me:

Code: Select all

21/tcp 1830
that's fine... you can confirm which service is running on that port using ps:

Code: Select all

ps -A | grep 1830
let's check which proc is currently sitting on this port before continuing...
DarkRanger wrote:

Code: Select all

root@ubuntu:~# /etc/init.d/inetd restart
-bash: /etc/init.d/inetd: No such file or directory
:? new one for me... netkit scripts missing maybe?...

if you'd like to trash and start anew...

Code: Select all

apt-get --purge proftpd
apt-get install proftpd
i've only ever set up ad-hoc implementations to overcome other hiccups before reverting to a home-grown sFTP server, so not in my comfort zone, but i KNOW proftpd and it's normally hassle free...

<edit>
just installed proftpd and noted the latest inetd revision is actually the openbsd flavour...

Code: Select all

######@######:~$ /etc/init.d/openbsd-inetd restart

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 14:02
by DarkRanger
First command gives this...

Code: Select all

root@ubuntu:~# ps -A | grep 1830
 1830 ?        00:00:00 inetd
I assume it is correct?

I've also tried the restart thing, still the same error. Going to try a 'reinstall'.

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 14:03
by DarkRanger
E: Invalid operation proftpd

thats the error i get when I try to purge...

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 14:12
by DarkRanger

Code: Select all

root@ubuntu:~# apt-get --purge autoremove proftpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting proftpd-basic instead of proftpd
The following packages will be REMOVED:
  libfile-copy-recursive-perl* openbsd-inetd* proftpd-basic* update-inetd*
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 2662kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 45399 files and directories currently installed.)
Removing proftpd-basic ...
ProFTPd is started from inetd/xinetd.
Purging configuration files for proftpd-basic ...
Cool, I think That did it... Just waiting for it to finish then I'll reinstall.

Re: proFTPd doesn't want to login

Posted: 30 Jun 2010, 14:25
by rustypup
ah... good to hear...

for future fun, if you're unsure of the installed package:

Code: Select all

dpkg --get-selections | grep <pkg_filter>
eg
dpkg --get-selections | grep ftp