Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can access my ubuntu box via ftp with username root and the same password I use for root ssh access.

I can't seem to ftp into the box with other usernames that are fine via ssh. I've tried looking for files like .vsftpd in /etc/ but no joy as yet, am I barking up the right tree?

Thanks

share|improve this question

4 Answers 4

up vote 5 down vote accepted

You can run sudo lsof to look at all the open files (which includes sockets) and find out which application uses TCP port 21 and/or 22.

share|improve this answer
    
Awesome, this worked a treat –  Dr. Frankenstein Sep 28 '10 at 19:03

The command netstat -tanp will show you what PID is associated with what port, look for a line like this to find what daemon is LISTENing on port 21:

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1450/sshd

But of course with port number 21 and not 22 (21 for ftp). Then you can use dpkg -S <binary> to see what package is providing it. <binary> is the name of the daemon on the last column of netstat, after the PID.

share|improve this answer

Here's a "fun" way to do this. First you have to install dpkg-awk.

dpkg-awk 'Status:installed' 'Provides:ftp-server' -- Package

Translation: match on packages that are installed and that provide the ftp-server metapackage. Of those, print only the Package: line.

share|improve this answer
    
That's a cool one. –  coredump Jul 21 '10 at 0:16

telnet ip.addr.of.host ftp

You'll probably get a link that starts with 220 with the software name and version. For vsftpd:

220 (vsFTPd 2.0.4)
share|improve this answer
1  
It's more accurate to say you might get a 220 that includes the name of the software. Some servers don't, for reasons of "security". –  womble Jul 23 '11 at 0:53
    
Yes, you're right, but as long as he's not aware of any ftp daemons running, it's probably a normal version of a daemon. –  MihaiM Jul 26 '11 at 7:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.