Home > Archive > Linux/Unix > July 2002 > FTP daemon





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author FTP daemon
Boulware5

2002-06-21, 10:33 pm

My Linux+ book says the ftp daemon is started with ./ftpd start. Is that correct? I played around with it (but not set up a full FTP server yet) and ftpd was not even an executable program. After chmod'ing it, it gave me syntax errors when I ran it. And I hardly made any edits in /etc/ftpaccess.

Now my Red Hat specific book is saying you start it with in.ftpd -al. The 'a' option makes use of the /etc/ftpaccess file and -l logs it to syslog. This is for WU-FTP.

Is my Linux+ book wrong?

Also, is there a simple command that shows you all the currently running daemons? I thought it might be /sbin/chkconfig --list but I'm not sure.
ccieToBe

2002-06-22, 11:24 pm

Is the Linux+ book describing wuftp or another ftp daemon? I'm not sure what wuftp's syntax is like. Try looking at wuftp's man page. I always use proftpd for security reasons.

You can get a list of all runnig processes by issuing "ps aux".
Boulware5

2002-06-22, 11:35 pm

Well the Linux+ book says the most common FTP server in use is WU-FTP. Then it starts talking about /etc/ftpaccess. So I assume it's talking about wu-ftp when it tells to start it by ./ftpd start.

And I really don't care about security right now. It's just practicing doing what I'm reading. I want to be able to set up a Linux FTP server. Next I want to set up NFS, samba, etc. So it's not like I will use wu-ftp much at all.
Boulware5

2002-06-23, 4:15 pm

Just to update....IF the book was talking about wu-ftpd - which I think it was - it is wrong. The daemon is started through xinetd (/etc/init.d/xinetd ). Maybe it's a Red Hat thing, I dunno. Or it's a book error.
The VMS Kid

2002-06-24, 6:35 am

quote:
Originally posted by Boulware5
Just to update....IF the book was talking about wu-ftpd - which I think it was - it is wrong. The daemon is started through xinetd (/etc/init.d/xinetd ). Maybe it's a Red Hat thing, I dunno. Or it's a book error.


It's neither. Most internet-related daemons are started via the Internet Meta-Daemon, inetd. In Red Hat and Mandrake, the xinetd daemon is used instead. If you are configuring a box to only be used as an FTP server, then you can start it as a standalone server by issuing a command like:

/sbin/ftpd start

However, most of the time nowadays, FTP is only one of several services that are running via the inetd or xinetd daemon. The inetd daemon listens on a number of ports for incoming requests. When it gets a request on a specific port, it then spawns the server that can deal with that request. This has the advantage of saving memory space since instead of having an ftpd or fingerd daemon running at all times, they will only start up after a request for that service has been requested. The disadvantage is that the response time is slightly slower since the service is not already running. You can do it either way, depending on your needs.
The VMS Kid

2002-06-24, 7:57 am

quote:
Originally posted by Boulware5

Also, is there a simple command that shows you all the currently running daemons? I thought it might be /sbin/chkconfig --list but I'm not sure.



You can use "top" for a dynamic listing of the top processes, "pstree" for a hierarchical view of processes or "ps aux" for a static listing of processes. Check your man pagesfor details on each.
esexon

2002-06-28, 11:41 am

lsof -i will show u what daemons are listening, or do a lsof -i :80.

Also a netstat -tap will show u what daemons are listening.

Evan
lopezb

2002-07-07, 12:19 am

[root@mysql-server root]# vi /etc/xinetd.d/wu-ftpd

# default: on
# description: The wu-ftpd FTP server serves FTP connections. It uses \
# normal, unencrypted usernames and passwords for authentication.
service ftp
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.ftpd
server_args = -l -a
log_on_success += DURATION USERID
log_on_failure += USERID
nice = 10
disable = yes
}
##END

>>change disable = yes
>>to disable = no

[root@mysql-server etc]# ps -aux |grep xinetd
root 25351 0.0 0.6 2244 996 ? S 22:11 0:00 xinetd
(your pid number will be different)

[root@mysql-server etc]#kill -9 25351
(use YOUR pid in place of 25351)

[root@mysql-server etc]# /usr/sbin/xinetd

ftp config files:

/etc/ftpaccess

You can configure authorized users, hosts etc from that file.

check to see if its running

[root@mysql-server etc]# nmap -sT 127.0.0.1

Starting nmap V. 2.54BETA22 ( www.insecure.org/nmap/ )
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1534 ports scanned but not shown below are in state: closed)
Port State Service
21/tcp open ftp
22/tcp open ssh
70/tcp open gopher
111/tcp open sunrpc
712/tcp open unknown
3306/tcp open mysql
32770/tcp open sometimes-rpc3
32771/tcp open sometimes-rpc5

>>OR<<

[root@mysql-server etc]# netstat -tan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:32770 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:32771 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:70 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:712 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6010 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.3:22 192.168.1.2:37932 ESTABLISHED


Thats it - FTP server up and rady for exploits.

Bill
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net