Star / Stop FTP server on FreeBSD / OpenBSD
Q. How do I stop / start default FTP server on FreeBSD or OpenBSD UNIX system?
A. ftpd is the Internet File Transfer Protocol server under BSD and configured via inetd. The ftpd utility is the Internet File Transfer Protocol server process. The server uses the TCP protocol and listens at the port specified or by default at port 21.
The inetd server should be run at boot time by /etc/rc. It then listens for connections on certain internet sockets. When a connection is found on one of its sockets, it decides what service the socket corresponds to, and invokes a program to service the request. The server program is invoked with the service socket as its standard input, output and error descriptors. After the program is finished, inetd continues to listen on the socket.
Task: Disable FTPD
Login as root user.
To disable ftpd open /etc/inetd.conf file:
# vi /etc/inetd.conf
Find line:
ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
To disable a service, comment it out by prefixing the line with '#'.
#ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
Save and close the file.
Task: Restart inetd
Now just restart inetd, enter:
# /etc/rc.d/inetd restart
OR if you are using OpenBSD:
# kill -HUP `cat /var/run/inetd.pid`
To enable ftp, reverse the step # 1.
E-mail this to a friend
Printable version
Related Other Helpful FAQs:
- MySQL startup script under BSD/Linux
- How do I start and stop NFS service?
- How To Start and Stop MySQL Database Server From A Shell Prompt
- Linux Start and stop the cron or crond service
- How To Restart Linux NFS Server Properly When Network Become Unavailable
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!




Recent Comments
Yesterday ~ 12 Comments
Yesterday ~ 7 Comments
Yesterday ~ 2 Comments
Yesterday ~ 3 Comments
Yesterday ~ 3 Comments