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 have installed vsftpd and configured as per several tutorials (just the very basic, standard setup) but when I run cat /etc/services there is nothing appearing for Port 21.

What steps do I need to follow in order to add this in?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

The /etc/services file is just text. You can edit it using your favourite text editor. My CentOS system has the following for ftp

ftp-data        20/tcp
ftp-data        20/udp
# 21 is registered to ftp, but also used by fsp
ftp             21/tcp
ftp             21/udp          fsp fspd
share|improve this answer

/etc/services does not provide you a real-time list your server has running.

Use netstat -tlnp to see processes listening on some network ports.

share|improve this answer
    
Thanks, I ran that and noticed my Local Address for :21 is 0.0.0.0, should this not be 127.0.0.1? –  Toby Jul 19 '11 at 7:43
1  
0.0.0.0 means "listen on all addresses available on this server". 127.0.0.1 would mean you only could contact your server from localhost and not from the outside world. –  Janne Pikkarainen Jul 19 '11 at 7:44

You just need to open up /etc/services in a text editor and add it. There's nothing special that needs to be done. I'm incredibly surprised that it's not in there already; try a grep for ftp.

share|improve this answer

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.