⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0151-0152.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:




<HTML>

<HEAD>

<TITLE>Developer.com - Online Reference Library - 0672311739:RED HAT LINUX 2ND EDITION:FTP</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311739 //-->

<!-- TITLE=RED HAT LINUX 2ND EDITION //-->

<!-- AUTHOR=DAVID PITTS ET AL //-->

<!-- PUBLISHER=MACMILLAN //-->

<!-- IMPRINT=SAMS PUBLISHING //-->

<!-- PUBLICATION DATE=1998 //-->

<!-- CHAPTER=08 //-->

<!-- PAGES=0131-0152 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->









<P><CENTER>

<a href="0148-0150.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch09/0153-0156.html">Next</A>

</CENTER></P>



<A NAME="PAGENUM-151"><P>Page 151</P></A>













<H3><A NAME="ch08_ 48">

FTP Administrative Tools

</A></H3>









<P>Several tools are available to help you administer your FTP server. These tools were

automatically installed as part of the wu-ftp package when the

wu-ftpd RPM was installed. These utilities help you see the current status of the server as well as control its shutdown procedure:

</P>









<UL>

<LI>          ftpshut

<LI>          ftpwho

<LI>          ftpcount

</UL>









<H5><A NAME="ch08_ 49">

ftpshut

</A></H5>









<P>The ftpshut command helps make shutting down the FTP server easier. This capability,

of course, applies only if you are running the server all the time instead of leaving it to be

invoked from inetd as needed. The format of

ftpshut is

</P>





<!-- CODE SNIP //-->

<PRE>

ftpshut -l   &lt;login-minutes&gt; -d    &lt;drop-minutes&gt;   &lt;time&gt;   &lt;warning  message&gt;

</PRE>

<!-- END CODE SNIP //-->











<P>where &lt;login-minutes&gt; is the number of minutes before the server shutdown that the

server will begin refusing new FTP transactions.

&lt;drop-minutes&gt; is the number of minutes before

the server shutdown that the server will begin dropping existing connections. The default value

for &lt;login-minutes&gt; is 10, and the default for

&lt;drop-minutes&gt; is 5.

</P>









<P>&lt;time&gt; is the time at which the server will be shut down. You can specify this time in one

of three ways. The first is to specify the time in military format without the colon (for

example, 0312 to indicate 3:12 a.m.). The second is to specify the number of minutes to wait

before shutting down. The format of this method is

+&lt;min&gt;, where &lt;min&gt; is the number of minutes

to wait. (For example, +60 causes the server to shut down in 60 minutes.) The last option is

the most drastic; by specifying the string now, the server shuts down immediately.

</P>









<P>&lt;warning message&gt; is the message displayed on all the FTP clients that the server will be

shut down. See the description of the shutdown command for the

/etc/ftpaccess file earlier in this chapter for details on the formatting available for the warning message.

</P>









<H5><A NAME="ch08_ 50">

ftpwho

</A></H5>









<P>ftpwho displays all the active users on the system connected through FTP. The output of

the command is in the format of the /bin/ps command. This format of this command is

</P>





<!-- CODE SNIP //-->

<PRE>

&lt;pid&gt; &lt;tty&gt; &lt;stat&gt; &lt;time&gt;

&lt;connection details&gt;

</PRE>

<!-- END CODE SNIP //-->











<P>where &lt;pid&gt; is the process ID of the FTP daemon handling the transfer;

&lt;tty&gt; is always a question mark (?) because the connection is coming from FTP, not Telnet;

&lt;stat&gt; is the status of that particular instance of the daemon where

S means it's sleeping, Z means it has crashed

(gone &quot;zombie&quot;), and R means that it is the currently running process.

&lt;time&gt; indicates how much actual CPU time that instance of the FTP has taken, and finally,

&lt;connection details&gt; tells where the connection is coming from, who is the user,

and what that user's current function is.

</P>



<A NAME="PAGENUM-152"><P>Page 152</P></A>









<P>The following is an example of output from

ftpwho:

</P>





<!-- CODE //-->

<PRE>

Service class all:

10448  ?  S  0:00 ftpd: vestax.domain.com: anonymous/sshah@domain.com: IDLE

10501  ?  S  0:00 ftpd: toybox.domain.com: heidi: RETR mklinux-ALL.sit.bin

   -   2 users ( -1 maximum)

</PRE>

<!-- END CODE //-->











<P>Here, you can see that two users are logged in (an unlimited number of users is allowed

to connect). The first user is an anonymous user who claims to be

sshah@domain.com and is currently not performing any functions. The second user, who has the username

heidi, is currently retrieving the file

mklinux-ALL.sit.bin.

</P>









<H5><A NAME="ch08_ 51">

ftpcount

</A></H5>









<P>ftpcount, which is a simplified version of

ftpwho, shows only the total count of users logged

in to the system and the maximum number of users allowed. A sample output from

ftpcount shows the following:

</P>





<!-- CODE SNIP //-->

<PRE>

Service class all                  -   2 users ( -1 maximum)

</PRE>

<!-- END CODE SNIP //-->











<H3><A NAME="ch08_ 52">

Summary

</A></H3>









<P>You might think that the proliferation of the World Wide Web would make FTP servers

extinct; however, the last few years have shown us that quite the opposite is true. People are

still deploying FTP sites in full force because of the ease of which they can be established and

maintained. No cute HTML to do, no extra work&#151;just put the file in the right place for

download and let people get it.

</P>









<P>This chapter covers a lot of detail on configuring the

wu-ftpd server. The key points to remember when working with the FTP server are as follows:

</P>









<UL>

<LI>          Keep a good watch on security announcements related to FTP servers, especially

the wu-ftpd server.

<LI>          Monitor your logs for suspicious activity.

<LI>          Test your configuration carefully. With the large number of options available,

you want to be sure that it behaves the way you intend it to.

<LI>          When setting up file owners and permissions, be sure that the permissions are correct.

<LI>          Use a lot of messages to help make your server self-documenting to outside users.

</UL>









<P><CENTER>

<a href="0148-0150.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch09/0153-0156.html">Next</A>

</CENTER></P>









</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -